Keyword

Show generic image if "empty"

  • Francisco Caivano Zori
  • Francisco Caivano Zori's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 8 months ago #92183 by Francisco Caivano Zori
Show generic image if "empty" was created by Francisco Caivano Zori
Im tryng yo use this code:

 

<?phpif(!empty($this->item->image))echo '<img src="empty.jpg" />';?>

 

 

But it doesnt work,

 

Any ideas?

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #92184 by Terry Britton
Replied by Terry Britton on topic Show generic image if "empty"
<?php 

if(!empty($this->item->image)) :echo '<img src="empty.jpg" />';

endif; ?>

 

Note the colon at the end of the second line and the endif at the end. Also you will have to give either a relative or full path to empty.jpg.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum