1
pod
<{if $xoops_contents == 1}> ?
  • 2005/5/14 23:52

  • pod

  • Quite a regular

  • Posts: 301

  • Since: 2003/4/19


I need to know how to create an *if content exists, display content* statement, for theme development.
I've tried <{if $xoops_contents == 1}> - doesn't work.
Surely there's a variable for this...?

2
Dave_L
Re: <{if $xoops_contents == 1}> ?
  • 2005/5/15 1:17

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


What kind of content? Could you give an example?

3
pod
Re: <{$xoops_contents}>
  • 2005/5/15 1:36

  • pod

  • Quite a regular

  • Posts: 301

  • Since: 2003/4/19


<{$xoops_contents}>

If I want to wrap <{$xoops_contents}> in a div or table, for example, I don't want that table or div to display if a site is not using a module as a start page, when viewing the start page.

Like if I put
<table><tr><td><{$xoops_contents}></td></tr></table>
...the table still renders even if <{$xoops_contents}> is null, it just displays with nothing inside it. I need an *if* in which to wrap the table.

Get me?

The alternative would be to edit each module template file to wrap the contents, which I have done, but is a major pain. I'm looking for a more logical solution.

4
Dave_L
Re: <{$xoops_contents}>
  • 2005/5/15 1:47

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


You can do this:

<{if !empty($xoops_contents)}>
   <
table><tr><td><{$xoops_contents}></td></tr></table>
<{/if}>

5
pod
Re: Dave_L Rocks
  • 2005/5/15 1:53

  • pod

  • Quite a regular

  • Posts: 301

  • Since: 2003/4/19


You sir are my hero.

Thank you. Resized Image

Login

Who's Online

146 user(s) are online (77 user(s) are browsing Support Forums)


Members: 0


Guests: 146


more...

Donat-O-Meter

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

Latest GitHub Commits