I have a ditto call for a teaser page that returns the following chunk per page.
I am calling a snippet in the chunk to retrieve the first item in a textbox TV (a comma delimited list of images).
<div id="teaser-slot-[+id+]" class="grid_7 omega finger">
[[first-project-image? &tv=`project-images` &docid=`[+id+]`]]
<img class="teaser-media-slot {src: '[+first-image-over+]'}" src="[+first-image+]" width="260" height="151" alt=""/>
<div id="teaser-head-[+id+]">
<div id="teaser-title-[+id+]" class="teaser-title inactive">[+pagetitle+]</div>
<div id="teaser-subtitle-[+id+]" class="teaser-subtitle inactive">[+client-name+]</div>
<div id="teaser-list-orange-[+id+]" class="teaser-list-orange inactive">[+disciplines-covered+]</div>
</div>
</div>
The snippet only sets the placeholders in the img tag.
The snippet returns the correct src values per item (i have echo’d the output)
but the first image src is duplicated into the second position offsetting all subsequent src image by 1.
Can anyone advise?
thanks,
anton
"The announcement of a vast project is always its betrayal" - Bataille
After a quick break, I decided to reorder the whole thing:
ditto [uncached] calls a chunk
only containing the snippet call [cached].
The snippet sets the various placeholders in the original display chunk and returns it.
this works
"The announcement of a vast project is always its betrayal" - Bataille