Display image if field is not empty

More
12 years 3 months ago #41660 by ggppdk
Hello

please look at your code carefully,
and if you use print_r on various variables, you will see what is available:

Most notably do:
Code:
echo "<pre>" . print_r($this->item, true) . "</pre>";
on the ITEM variable to see what is available

it is cumbersome for us to look at long listings of code, particularly since we ... can not run it locally ;)

Also we said above that this wrong, but you still have it in your code:
$this->fields->display

does not exist !

instead use [c:del0dl2u]$this->item->fields[&#39;web&#39;]->display[/c:del0dl2u] for item view
and [c:del0dl2u]$this->items[$i]->fields[&#39;web&#39;]->display[/c:del0dl2u] for category view

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

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

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save