Customizing the tooltip in a category view

More
10 years 1 month ago #50418 by GamerLive
bonjour, je souhaite modifier le tooltip des items dans une de mes catégories uniquement, j'ai repéré l'emplacement à modifier dans mon template mais je ne sais pas par quoi remplacer pour obtenir le résultat souhaité. je voudrai obtenir le même résultat que j'ai réussi à obtenir dans un champ relation_reverse ou j'ai affiché l'image de l'item avec le tooltip de cette image.

hello, I want to change the tooltip items in one of my classes only, I spotted the location to change in my template but I do not know what to replace to get the desired result. I am getting the same result I was able to get into a field or relation_reverse I posted the picture of the item with the tooltip of this image.

in my relation_reverse i use this :
Code:
<a href="__item_url__" __field20_tooltip__>{{field20##display_small}}

je souhaite donc faire de même sur mon affichage catégorie. J'ai trouvé cette zone de code à modifier dans mon template.
So I would do the same on my category display. I found this area code change in my template.
Code:
<div class="lineinfo image_descr"> <?php if ($this->params->get('lead_use_image', 1) && $src) : ?> <div class="image<?php echo $this->params->get('lead_position') ? ' right' : ' left'; ?>"> <?php if ($this->params->get('lead_link_image', 1)) : ?> <a href="<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($items[$i]->slug, $items[$i]->categoryslug)); ?>" class="hasTip" title="<?php echo JText::_( 'FLEXI_READ_MORE_ABOUT' ) . '::' . htmlspecialchars($items[$i]->title, ENT_COMPAT, 'UTF-8'); ?>"> <img src="<?php echo $thumb; ?>" alt="<?php echo htmlspecialchars($items[$i]->title, ENT_COMPAT, 'UTF-8'); ?>" /> <?php else : ?> <img src="<?php echo $thumb; ?>" alt="<?php echo htmlspecialchars($items[$i]->title, ENT_COMPAT, 'UTF-8'); ?>" /> <?php endif; ?> </div>

je pense que dans ce code c'est cette partie à modifier :
I think in this code is that part to change:
Code:
htmlspecialchars($items[$i]->title, ENT_COMPAT, 'UTF-8')

Mais je ne sais pas ce que je dois mettre pour obtenir le tooltip de l'image et non le titre de l'item.
But I do not know what I have to to get the tooltip of the image and not the title of the item.

Please help me.

Portail communautaire sur l'univers des consoles Sony entièrement réalisé avec Flexicontent.

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

More
10 years 1 month ago #50423 by ggppdk
Hello

code to change is this:
Code:
class="hasTip" title="<?php echo JText::_( 'FLEXI_READ_MORE_ABOUT' ) . '::' . htmlspecialchars($items[$i]->title, ENT_COMPAT, 'UTF-8'); ?>"


-- 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 1 month ago #50426 by GamerLive
Comment puis je appeler la tooltip de mon champ image à la place du titre de l'item ?

How can I call the tooltip of my image field instead of the title of the item?

Portail communautaire sur l'univers des consoles Sony entièrement réalisé avec Flexicontent.

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

More
10 years 1 month ago #50428 by ggppdk
Hello

yes

do a
Code:
if ( !empty($item->fields['myimagefield']->value)) { foreach ($item->fields['myimagefield']->value as $_v) { echo "<pre>"; $val = unserialize($_v); print_r($val); echo "</pre>"; } }



or for first value:
Code:
if ( !empty($item->fields['myimagefield']->value[0])) { echo "<pre>"; $val = unserialize($item->fields['myimagefield']->value[0]); print_r($val); echo "</pre>"; }


you can see more here:
Using the raw value of a field inside a template file or inside a new custom field type


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