PHP script if Content Block is Empty

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
dennart
Posts: 15
Joined: Tue 13. Apr 2004, 15:16

PHP script if Content Block is Empty

Post by dennart »

Sorry for my English.

Please help me. Will be work that sequence in template?

...

Code: Select all

<div>
{HEADER}

[PHP]
if(empty($content['CB']['HEADER'])

{echo ('<img src="i/himage_02.jpg" width="500" height="375" />');}

[/PHP]
<div>
...
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: PHP script if Content Block is Empty

Post by flip-flop »

Hi,

please have a look:

Code: Select all

[PHP]
echo empty($GLOBALS['content']['CB']['HEADER']) ? 'UNFILLED' : 'FILLED';
[/PHP]
Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
dennart
Posts: 15
Joined: Tue 13. Apr 2004, 15:16

Re: PHP script if Content Block is Empty

Post by dennart »

Ok! Thanks, try it.
dennart
Posts: 15
Joined: Tue 13. Apr 2004, 15:16

Re: PHP script if Content Block is Empty

Post by dennart »

It cool. WORKING! Many thaks!
Post Reply