2 galleries in different places?

More
5 years 8 months ago - 5 years 8 months ago #74340 by lipatovroman
Hello!
I have gallery field with multiple images.
It displays in item template as gallery with "All thumbnails" mode.
How I can display this gallery one more time in another place, but with only first image?
Thanks. 
Last edit: 5 years 8 months ago by lipatovroman.

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

More
5 years 8 months ago #74341 by micker
maybe concate first field oiin other one
like in prefix{fieldgalerie##0} to display first image
and use empty value in defaut value (load for all value)

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
5 years 8 months ago #74344 by ggppdk
Hello

in a different page you can do:
Code:
<?php echo FlexicontentFields::getFieldDisplay($this->item, 'fieldname', null, 'display_single_total'); ?>
See here
flexicontent.org/documentation/faq/71-fi...e-gallery-field.html

In same page you will have issue with duplicate HTML tag ids if you try inject the gallery twice (depends on gallery used)

This would be safe to add in same page and get the first thumbnail
Code:
<?php echo '<img onclick="alert('Some code to open gallery. See gallery JS documentation')" src="'   . FlexicontentFields::getFieldDisplay($this->item, 'fieldname', null, 'display_medium_src') . '" alt="Gallery" />'; ?>


-- 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...

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

More
5 years 8 months ago #74348 by lipatovroman

ggppdk wrote: Hello
This would be safe to add in same page and get the first thumbnail

Code:
<?php echo '<img onclick="alert('Some code to open gallery. See gallery JS documentation')" src="'   . FlexicontentFields::getFieldDisplay($this->item, 'fieldname', null, 'display_medium_src') . '" alt="Gallery" />'; ?>


Hello
Yes, it works.
But what should I use instead
Code:
onclick="alert('Some code to open gallery See gallery JS documentation')"

To get popup image working?

I use Fancybox gallery layout.

Thanks.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.455 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