Usage of custom link of image field

More
10 years 5 months ago #51860 by Rooney
Hi,
I have setup an image field with a custom link. If I use the image from the field in a category blog a link is added to the image but not the custom one but the link to the full article. Is this on purpose? I remember that in earlier versions of FC the behaviour has been different and the custom link was used!
Rooney

Joomla! 3.9.24 and FC 3.3.9

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

More
10 years 5 months ago #51861 by ggppdk
Hello

-- if you image customization parameters of the "blog" FLEXIcontent template then you get a customized image thumbnail that links to the item

-- if you add image field to a field position the you will get the image thumbnail with the custom image 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
10 years 5 months ago #51865 by Rooney
Ah. Ok. Thanks for clarification!
Rooney

Joomla! 3.9.24 and FC 3.3.9

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

More
10 years 5 months ago #51867 by Rooney
Hi,
is there an easy way to load the custom url of an image in a template? I want to be able to load custom links of some images of a category blog.
Rooney

Joomla! 3.9.24 and FC 3.3.9

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

More
10 years 5 months ago #51896 by Rooney
Hi,
just wanted to ask again. Might have been that the question was treated as solved because of my first answer. Is there a way to get the linkurl in a template?
Rooney

Joomla! 3.9.24 and FC 3.3.9

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

More
10 years 5 months ago #51899 by ggppdk
Hello

one way is not to use "image parameter" of the blog template and instead place the field in a template position


other way if you want to use the blog image placement is to modify the HTML of the template

1. Make a copy of the FLEXIcontent 'blog' template
2. Replace 2 times:
Code:
<a href="<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($item->slug, $item->categoryslug, 0, $item)); ?>">

with:
Code:
<?php $v = isset($img_field->value[0]) && @unserialize($img_field->value[0])!==false ? unserialize($img_field->value[0]) : $img_field->value[0]; ?> <a href="<?php echo @$v['link'] ? $v['link'] : JRoute::_(FlexicontentHelperRoute::getItemRoute($item->slug, $item->categoryslug, 0, $item)); ?>">


-- 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.309 seconds
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
Save