Fork me on GitHub

Search

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 3.0 4 6 adslight Android AntiHarvesting AntiSpam API Apple Battlefield billige Bootstrap By Captcha cell cent chronolabs CHUNG content CĂN demo Digitally docek download Dresses evden eve facebook Fat floor Food for free Gateway Google Guide herre Honeypot HP Human HỘ IP iPhone jQuery Language Law Legal List log Loss module modules Monster new newbb news NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher Rapid RESIDENCE responsive review Rights rmcommon security Sentry Signatures Signed site Smartphone Solution Spam stem Studio tdmcreate template The Theme themes web weight xoops Xortify XPayment ZendFramework

New Users

Registering user

# 137911

mydarkglobe

Welcome to XOOPS!




Bottom   Previous Topic   Next Topic  |  Register To Post

(1) 2 »


#1 Posted on: 2008/7/29 11:37 Does a block or block-template know where it is positioned?
Strange question, I know! I would like to use a css-only based tooltip, but therefore I need to know whether the block is placed on the left or right side. If I know this, then I can use different classes for the tooltip. A smarty-solution would be nice.

Any hints for me?

Top

frankblack
Joined:
2005/6/13 3:03
From D-Schiefbahn
Group:
Registered Users
Posts: 785
(Show More) (Show Less)


#2 Posted on: 2008/7/29 12:50 Re: Does a block or block-template know where it is positioned?
hi,

You might take a look to "Morphogenesis gabarit" and his stylesheet blocks.css.

Many combinations :
#xo-page-topleftblocks .xo-block {}
#xo-page-bottomleftblocks .xo-block {}
#xo-page-toprightblocks .xo-block {}
#xo-page-bottomrightblocks .xo-block {}
... etc.

Hope it helps

@+

Top


Still learning CSS and... english
Burning
Joined:
2006/8/22 14:44
Group:
Registered Users
Repository Group
Posts: 1109
(Show More) (Show Less)


#3 Posted on: 2008/7/29 12:58 Re: Does a block or block-template know where it is positioned?
in the default theme there arte $xoops_showcblock,$xoops_showlblock,$xoops_showrblock,

maybe
<{if $xoops_showcblock }>

style1.css


<{elseif $xoops_showrblock}>

style2.css

<{else}>

style3.css


didn't try it

Top

demian
Joined:
2008/4/29 0:06
Group:
Registered Users
Posts: 225
(Show More) (Show Less)


#4 Posted on: 2008/7/29 16:13 Re: Does a block or block-template know where it is positioned?
doesn't seem to be any theme guys left here at XOOPS to help you... maybe ask somewhere else?

Top

scrapple
Joined:
2008/7/29 16:12
Group:
Registered Users
Posts: 1
(Show More) (Show Less)


#5 Posted on: 2009/12/16 7:40 Re: Does a block or block-template know where it is positioned?
Bump.
I have this same issue. I need my main menu block to output different html if it is left or right.

I even tried putting
<{assign var="Block_Position" value="canvas_left"}>
before the
<{foreach item=block from=$xoBlocks.canvas_left}>....
and
<{assign var="Block_Position" value="canvas_right"}>
befpre the
<{foreach item=block from=$xoBlocks.canvas_right}>.....
but no luck.

The main template "sees" <{$Block_Position}> but the block doesn't.

Is there any way to do this without a core hack?

Top

abrizan
Joined:
2005/11/14 7:16
From Trinidad (Caribbean)
Group:
Registered Users
Posts: 36
(Show More) (Show Less)


#6 Posted on: 2009/12/16 7:59 Re: Does a block or block-template know where it is positioned?
You make the left and right html in your block inside a div with class eg leftpart and rightpart.
Your columns have also a class, name or id in their div eg class leftcolumn.
In your CSS you suppress the inappropriate parts:
.leftcolumn .rightpart {displaynone};
.
rightcolumn .leftpart {displaynone};



Top

ghia
Joined:
2008/7/3 14:19
From Belgium
Group:
Registered Users
Posts: 4946
(Show More) (Show Less)


#7 Posted on: 2009/12/16 8:18 Re: Does a block or block-template know where it is positioned?
I think you need to hack core or wait for a better version.



Top

trabis
Joined:
2006/9/1 13:10
From Portugal
Group:
Webmaster
Registered Users
Posts: 2198
(Show More) (Show Less)


#8 Posted on: 2009/12/16 11:08 Re: Does a block or block-template know where it is positioned?
I was hoping to find a more elegant Smarty solution and not a CSS or Javascript hack.
Is there really no way that this can achieved through Smarty?

Top

abrizan
Joined:
2005/11/14 7:16
From Trinidad (Caribbean)
Group:
Registered Users
Posts: 36
(Show More) (Show Less)


#9 Posted on: 2009/12/16 13:10 Re: Does a block or block-template know where it is positioned?
No smarty solution because blocks are rendered first and then they are assigned to positions so, at block execution time, smarty is not aware of the block location. This requires only line of code in class theme_blocks.php, maybe in next release.

Top

trabis
Joined:
2006/9/1 13:10
From Portugal
Group:
Webmaster
Registered Users
Posts: 2198
(Show More) (Show Less)


#10 Posted on: 2009/12/16 13:44 Re: Does a block or block-template know where it is positioned?
I would greatly appreciate it if this could be included in the next release. It would be very useful in my theme development.

Top

abrizan
Joined:
2005/11/14 7:16
From Trinidad (Caribbean)
Group:
Registered Users
Posts: 36
(Show More) (Show Less)




(1) 2 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You can vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create pdf.
You cannot get print page.

[Advanced Search]