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

1 year 10 months ago - 1 year 10 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 :
<?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.

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

1 year 10 months ago - 1 year 10 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:
<?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 review. Thanks!

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

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.