Trigger custom field in description

More
3 years 9 months ago #78950 by milind.purandare
Sorry I had tried that. I get following error :(it works without ##0 showing all images)

REPLACEMENT NOT FOUND:

{flexi_field:Photographs##0 item:current method:display}

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

More
3 years 9 months ago #78953 by ggppdk
Hello

when using replacements
you can not get individual image URLs
you get the final display of the field

but you can get the image gallery while only shing the first image
use 'display_single'

Code:
{flexi_field:Photograph item:current method:display_single}


These are available

display
display_small
display_medium
display_large
display_original

display_single
display_single_total
display_single_link
display_single_total_link


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

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

More
3 years 9 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
3 years 9 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.

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