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

More
6 years 9 months ago #72407 by lipatovroman
Ok, I added code, as you said:



But test text does not displays in frontend.

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

More
6 years 9 months ago #72411 by ggppdk
Hello

then the $alt
i used to create

$img_legend

in your case you need the $img_legend for large thumbnail

see the full code that i posted


-- 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 9 months ago #72415 by lipatovroman
Hello

Sorry, bit it does not work...

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

More
6 years 9 months ago #72420 by ggppdk
Hello


checkout the code that you are using
e.g. if the value was specified the it will be used

if you expect the code to also change the title / tooltip it will not !

the change is for the "alt" which appears only when image file is not found

so i am not sure what you mean with not working

please do you testing

e.g. do
Code:
echo ' TEST: img Tag is '. htmlspecialchars($img_legend) . '<br>';

make testing modifications and repeat


-- 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 9 months ago - 6 years 9 months 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 9 months ago by lipatovroman.

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

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

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