1
uberrookie
show content when there IS content
  • 2011/3/30 11:05

  • uberrookie

  • Just popping in

  • Posts: 34

  • Since: 2011/3/29


I've placed
le="color: #000000"><?php {$xoops_contents}
inside some divs for styling.

le="color: #000000"><?php <{if $xoops_contents && ($xoops_contents != ' ') }> <div id="content"><{$xoops_contents}></div> <{/if}>



(The if statement comes from the default 2.5.0 theme)

I don't have a starting page, but my divs are still shown.

In other words....while having no content, the if statement still get executed.

How do i prevent this execution when i have no content?

2
Tarik
Re: show content when there IS content
  • 2011/3/30 12:17

  • Tarik

  • Not too shy to talk

  • Posts: 170

  • Since: 2010/2/3 1


did you use
le="color: #000000"><?php {$xoops_contents}

or
le="color: #000000"><?php <{$xoops_contents}>
Some people like what you do,
-- some people hate what you do,
---- but most people simply don’t give a damn.

3
uberrookie
Re: show content when there IS content
  • 2011/3/30 14:13

  • uberrookie

  • Just popping in

  • Posts: 34

  • Since: 2011/3/29


I took a part of the default theme.html:
le="color: #000000"><?php <!-- Start content module page --> <{if $xoops_contents && ($xoops_contents != ' ') }> <div id="content"><{$xoops_contents}></div> <{/if}> <!-- End content module -->


added a styling div:

le="color: #000000"><?php <!-- Start content module page --> <{if $xoops_contents && ($xoops_contents != ' ') }> <div class="styling"> <div id="content"><{$xoops_contents}></div> </div> <{/if}> <!-- End content module -->


The div is always visible

4
uberrookie
Re: show content when there IS content
  • 2011/3/31 13:57

  • uberrookie

  • Just popping in

  • Posts: 34

  • Since: 2011/3/29


apparently the content of $xoops_contents is a 3 chars string. For now i fixed it by using:
<{if $xoops_contents && (strlen($xoops_contents) > 3) }>

but i don't think its a solution.

Login

Donat-O-Meter

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

Latest GitHub Commits