#177 Posted in ‘Showtime Image Gallery’

Latest post by Norbert Graup on Monday, 28 May 2018 23:37 EEST

Norbert Graup
Hi,
I just came around your Showtime Image Gallery extensions to use it in Joomla Custom Fields.
To display several custom fields wihtin an articel I created a template override to get an individual design.
So far everything works as expected and when I show the gallery automatically before or after content the gallery also works fine.
As I want to integrate the gallery in my override on an individual postion within my layout I need to call the gallery plugin just as the other custom fields, but I can´t get it work. Images are not showing in this case.

Can you help me and tell me how I call the custom field of the gallery "manually" in my override?

Thanks

Nobs

Lefteris Kavadas
Hi,

Is there a link to the page with the issue? Are you trying to display the gallery in a module position or just in a different position inside the override? The Showtime Image Gallery module has an option for displaying the current page gallery, if this is what you are looking for.

Regards

Norbert Graup
Hi,
nope, the site is still on my localhost.
I don´t want to show the gallery on a module position. I want to call the the gallery custom field with an article override, but not automatically (before or after content) rather in an individual position.

Thanks

Nobs

Lefteris Kavadas
Here you are:
<?php if (isset($this->item->jcfields[1])): ?>
<?php echo FieldsHelper::render('com_content.article', 'field.render', array('field'=> $this->item->jcfields[1])); ?>
<?php endif; ?>


Note that you need to replace the number 1 with the ID of the field you want to render. You can find this at the administration in the fields manager. Using the above code and setting "Automatic Display" to "Do not automatically display" you can render the custom field in the exact place you want.

Regards

Norbert Graup
Great! It works!
Thanks!

Note: An active subscription is required in order to get support for our paid extensions. For our free extensions, if you don't have an account, register and then submit your support request.  In case you just want to ask a question, you can also use the contact form .

Firecoders
Are you using our extensions? Please post a review at the Joomla extensions directory!
Post a review