Mini-app (File, video, Image) dont display in custom template

More
7 years 11 months ago - 7 years 11 months ago #65404 by netenvie
Hi,
in my template i try to display file (link to pdf) or image that are custom fields with file or image type.
I use this code that run well for other fields :
Code:
<?php echo $this->fields['photo']->display; ?>

But for file or image nothing display ...
Did i missed something ?
Perhaps these mini-apps need to be place in a display group to be prepared for display ??

I have another image field set to DB source and it display ok, the one that dont display is set to item/folder.
Last edit: 7 years 11 months ago by ggppdk.

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

More
7 years 11 months ago - 7 years 11 months ago #65407 by ggppdk
Hello

the way to display manually the fields in custom template code is:

1. You edit the ITEM / CATEGORY layout of the currently used template e.g. "my_blog_1",
and go to the TAB "Fields placement"
and add the desired field(s) to the layout position "RENDER-ONLY" of the layout ITEM / CATEGORY layout (the RENDER-ONLY position is near the bottom of every layout blog / degault / presentation / etc)

this way the "display" field will get created without the field showing

2. Inside e.g. item(_html5).php or category_items(_html5).php you display the field like this:
Code:
<?php echo $item->fields['field24']->display; ?> <?php echo $item->fields['myimage']->display; ?> <?php echo $item->fields['some_field_name]->display; ?>


-- 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...
Last edit: 7 years 11 months ago by ggppdk.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.354 seconds
Save
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