Hello,
I’m struggling at a clients request to have individual images be shown when user mouse overs a navigation link in menu.
The images are drawn from a snippet (produktFotoNavi) that gets file name info via TV named Basistyp.
What I did is entering in link attributes of the pages:
style="background-image:url([!produktFotoNavi? &basistyp=`[*Basistyp*]`!]);"
In Wayfinder row template I use:
<li>
<a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+] class="Tips4" style="">[+wf.linktext+]</a>
[+wf.wrapper+]
</li>
I wanted wf.attributes to be filled with the individual image based on the individual link attribute and with TV Basistyp that has been set for the linked page.
Wayfinder is called cached, the snippet in the link attribute uncached. I also tried vice versa but had no success.
This doesn’t work - the background image when hovering navigation links is always the same - that of the TV Basistyp of the page I am on (not of the page linked by the link I’m hovering over). The snippet itself does work, returning an image src.
Am I missing some easy point or you think it’s the wrong way?
Thanks if somebody can help!