1
WarDick
Block Control
  • 2004/5/2 19:02

  • WarDick

  • Just can't stay away

  • Posts: 890

  • Since: 2003/9/13


Are there any variables such as this <{if $xoops_showcblock == 1}>

For the left and right center blocks.

It seems the only option I have is to show both left and right center blocks if I want to have a center block. Or disable them completely.

I would like to have granular control of each option.

Different modules have different requirements of theme.html.

The controls are in place in block admin but are not reflected in the smarty variables that are passed to theme.html


2
JackJ
Re: Block Control
  • 2004/5/2 19:30

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


Perhaps I am not understanding your question.

You can choose center-center to have a center block. You don't need center-right or center-left to be acivated to have a center block

3
ladon
Re: Block Control
  • 2004/5/2 19:35

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


I'm not entirly sure I understand what you mean, but I'd guess you can use <{if $xoops_showcblock == 1}> for the center left and right blocks as well. Something like: <{if $xoops_showcleftblock == 1}> . <{/if}> I'm not sure about the name because I'm not at home, but it should work.

4
WarDick
Re: Block Control
  • 2004/5/2 19:40

  • WarDick

  • Just can't stay away

  • Posts: 890

  • Since: 2003/9/13


Yes I understand that is the way it works now.

However I want to select them all. But have them turned on by control of the module being accessed. For instance when displaying News I want only center-center. Now I want anyother module. This modules uses say center-right and center-left but no center-center. The blocks admin gives me the options and it works like it should. However, the smarty variables are not passing this information to theme.html.

I want to say if center-block right or if center-block left or if center-block center.


5
studioC
Re: Block Control
  • 2004/5/2 19:57

  • studioC

  • Friend of XOOPS

  • Posts: 922

  • Since: 2003/12/7


hello wardick,
Dunno really what you want to do but theres <{$xoops_crblocks}> which gives back "Array" if there is content and "" if there is no content. [being rendered] .. Sometimes i use this for creating IDs and classes ....
there is <{$xoops_clblocks}> and of course <{$xoops_ccblocks}> too.
have p h u n

michael

6
WarDick
Re: Block Control
  • 2004/5/2 20:04

  • WarDick

  • Just can't stay away

  • Posts: 890

  • Since: 2003/9/13


Thanks for your reply studioC

That is the information I am looking for.

7
studioC
Re: Block Control
  • 2004/5/2 20:08

  • studioC

  • Friend of XOOPS

  • Posts: 922

  • Since: 2003/12/7


no prob... switch your smarty template debug mashine on and you will find some nice things to use... .. but don't forget... adding <> .... again... have phun ..
michael

8
WarDick
Re: Block Control
  • 2004/5/2 20:29

  • WarDick

  • Just can't stay away

  • Posts: 890

  • Since: 2003/9/13


I tried you advice and did not get the results I was looking for.

My theme is designed without tables.
I am using div.
The problem when the array returns with no data the div will display with no data. Thus taking up space.

My goal is to not show the empty divs.

If the div use transparent background it appears to work OK
However, with a background color defined an empty div shows.

9
studioC
Re: Block Control
  • 2004/5/2 20:44

  • studioC

  • Friend of XOOPS

  • Posts: 922

  • Since: 2003/12/7


what about using
....


and in stylesheets ..

.hu_visible {}
.hu_visibleArray {}

now you will be able to hide that div ...
dunno which exactly you wanne hide... one way ..

.hu_visible {visibility:hidden;}
.hu_visibleArray {visibility:visible;}


michael

10
WarDick
Re: Block Control
  • 2004/5/2 20:51

  • WarDick

  • Just can't stay away

  • Posts: 890

  • Since: 2003/9/13


I don't think that I get what I am after with this approach.

I don't want the div to be hidden. I want them all to display when there is data to display.

I believe the fix is to add the variables
{$xoops_showcrblock} and {$xoops_showclblock}

All other blocks have this option.

I don't know how to add them without a hack.

Login

Who's Online

173 user(s) are online (127 user(s) are browsing Support Forums)


Members: 0


Guests: 173


more...

Donat-O-Meter

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

Latest GitHub Commits