Trigger custom field in description

More
4 years 4 months ago #78962 by milind.purandare
Hi

tenfurlongsmagazine.com/carnivals-races/...-with-a-purpose.html

The images at top are shown using image field in the template.

The images at bottom get displayed by following code:
{flexi_field:Photographs item:current method:display single}

It does not display single image.

Also will be nice if individual images can be shown by ##n.

Thank you.

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

More
4 years 4 months ago - 4 years 4 months ago #78963 by ggppdk
Hello

1.
you need to use
display_single
and not
display single

please notice the underscore


2. About the replacement feature in the plugin
It is purpose is to display fields and items and links in any place

it will not display things that the field does not provide
That is not the purpose of this feature of the plugin

If you want to customize the output display to get image ##N

you can do it yourself inside by custom coding what you need

inside your item.php
use (example)
Code:
$imgField = $items->fields['myimagefield']; $imgSrc5 = isset($imgField ->thumbs_path['small'][5]) ? $imgField ->thumbs_path['small'][5] : ''; $imagePos5 = $imgSrc5 ? '<img src="' . $field->thumbs_path['small']" . '" />' : ''; echo $imagePos5 ; // Add __myReplacement5__ to your description echo str_replace($imagePos5, '__myReplacement5__', $item->fields['text']->display);

The above is just an example
use / modify the above if you know PHP programming

You can also create a custom layout for the image field
In any case do not make it unnecessary complex


The availble data are
(see
www.flexicontent.org/documentation/tutor...e-gallery-field.html
)
Code:
Thumbnail URLs of first image only (all thumbnail sizes): $item->fields['imgfieldname']->{"display_backend_src"} $item->fields['imgfieldname']->{"display_small_src"} $item->fields['imgfieldname']->{"display_medium_src"} $item->fields['imgfieldname']->{"display_large_src"} $item->fields['imgfieldname']->{"display_original_src"} Thumbnail URLs of all images (gallery mode) (all thumbnail sizes) $item->fields['imgfieldname']->thumbs_src['backend'][] $item->fields['imgfieldname']->thumbs_src['small'][] $item->fields['imgfieldname']->thumbs_src['medium'][] $item->fields['imgfieldname']->thumbs_src['large'][] $item->fields['imgfieldname']->thumbs_src['original'][] Variables with filesystem PATHs $field->thumbs_path['backend'][] $field->thumbs_path['small'][] $field->thumbs_path['medium'][] $field->thumbs_path['large'][] $field->thumbs_path['original'][]


-- 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: 4 years 4 months ago by ggppdk.

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

More
4 years 4 months ago #78967 by milind.purandare
Thank you. I had used underscore. For some odd reason it was replaced by space when I copy pasted the code here.

It does display all images even with display _single

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

More
4 years 4 months ago #78970 by ggppdk
Hello

you appear to still have a space in the word display _single

Also copy pasting to forum topics does not add spaces ...

you can send me a PM with super admin access and tell me which item to edit and i will look at it


-- 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
4 years 4 months ago #78994 by ggppdk
Hello

i looked at it
the problem is not the replacements feature

the "display_single" method is passed to the image-gallery field

- but the image-gallery field seems to have a bug, it does not respect the display method
"display_single", or "display_single_total" etc

other display methods work (display an image that links to the item itself)
"display_single_link"

so a bug-fix in the image-gallery is needed,
i think the bug was introduced in our last review of image-gallery layouts
style="display: none;" for all but the first image was supposed to be added by it is no longer added

i will make a fix


-- 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
4 years 4 months ago #78995 by ggppdk
Hello

i have looked at it more

there is no bug in the image-gallery field ...

You have disabled the gallery feature in the image-gallery field

you have done so by selected a display of (inside the Viewing TAB)
"Thumbnail-only"

but if you do not have a JS gallery, then the images have no way of appearing if you only show the first image
meaning
"display_single" makes no sense ...

because its purpose is to show a single image that links to a gallery of all images

After enabling a gallery e.g. "Fancybox" then
display_single
display_single_total

work as expected


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

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