Fork me on GitHub
Get XOOPS XOOPSXOOPS FAQFAQ ForumsForums NewsNews ThemesThemes ModulesModules
New Posts New Topics All Posts All Forums Index General Modules Themes Development International XOOPS.org

Search

Nominate XOOPS!

Learn XOOPS Core

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $15.00
Net Balance: $14.11
Left to go: $85.89

Donations
Anonymous ($15)Jul-20

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 4 6 Abuse adslight Android AntiHarvesting AntiSpam API Apple Battlefield billige Blocks Bootstrap Captcha cell chronolabs Clicks content CĂN demo download Dresses eve facebook Fat floor for free Gateway Google Guide herre Home Honeypot HP html5 Human HỘ IP iPhone jQuery Language 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 Room security Sentry site Smartphone Smarty Smoking Spam stem Studio support tag tags tdmcreate template The Theme themes User userlog web weight xoops Xortify XPayment ZendFramework

New Users

Registering user

# 137619

bhpstr

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
Just can't stay away
Just can't stay away
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
Theme Designer
Theme Designer
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
Quite a regular
Quite a regular
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
Just popping in
Just popping in
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
Just popping in
Just popping in
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
Community Support Member
Community Support Member
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
Core Developer
Core Developer
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
Just popping in
Just popping in
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
Core Developer
Core Developer
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
Just popping in
Just popping in
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.

[Advanced Search]