[Added in v3.3.0+] Custom layouts for image field ?

More
6 years 1 month ago - 6 years 1 month ago #72428 by lipatovroman

ggppdk wrote: so i am not sure what you mean with not working


I added test text in alt tag:
Code:
$alt_image_prefix = flexicontent_html::striptagsandcut($item->title, 60) . ' test 11111 ' . JText::_('FLEXI_IMAGE') . ' '; $alt = ($usealt && isset($value['alt'])) ? $value['alt'] : $alt_image_prefix . ($n + 1); $img_legend = '<img src="'.JUri::root(true).'/'.$srcl.'" alt="'.$alt.'"'.$legend.' class="'.$class.'" itemprop="image"/>'; $img_nolegend = '<img src="'.JUri::root(true).'/'.$srcl.'" alt="'.$alt.'" class="'.$class.'" itemprop="image"/>';

This text does not displays in alt on site

Last edit: 6 years 1 month ago by lipatovroman.

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

More
6 years 1 month ago #72430 by ggppdk
Hello

then a different layout is used for this image field

add it in it
Code:
echo "TESTING";

does it get displayed ?

please note that it 'TESTING' may appear if you have 2 or more image fields and you have configured the layout to be used by other image field


-- 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
6 years 1 month ago #72431 by lipatovroman
echo "TESTING"; does not displays...

What is my steps:

1. Duplicate and rename

value_gallery_fancybox.php
value_gallery_fancybox.xml

to

value_gallery_fancybox2.php
value_gallery_fancybox2.xml

2. Choose fancybox2 in field settings



3. Add custom code to value_gallery_fancybox2.php



Does not work...

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

More
6 years 1 month ago #72434 by ggppdk
Hello

so if this layout is not being loaded

which layout gets loaded ?


-- 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
6 years 1 month ago #72436 by lipatovroman
Also very strange things:

I should edit value_thumbnail_basic.php to get desired results.
But in same time, in setting I should select fancybox2 - in this case it's ok.

If I choose native fancybox - it does not work.

But fancybox and fancybox2 - are same. It just duplicated.

All changes in value_thumbnail_basic.php...

:blink:

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

More
6 years 1 month ago #72437 by ggppdk
Hello

ok the custom layout selection for image field is not working properly

it is working for other fields , but for image field some new layout-selector options are enabled which cause the

"value_" not be stripped,

in your case the default layout gets loaded

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.

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