Thanks Jako.
Ditto placeholder are not set outside of the Ditto call. So you have to output the slider pagination in the Ditto Chunk (i.e. with a PHx construct). Easiest way would be in the last element.
Ah ok, that makes sense.
Hmmmm, I still can't get it to work.
This is my ditto call chunk...
<div class="cycle-slideshow"
data-cycle-slides="> div.slide"
data-cycle-fx="scrollHorz"
data-cycle-delay="1000"
data-cycle-timeout="5000"
data-cycle-speed="900"
data-cycle-pause-on-hover="true"
data-cycle-tmpl-regex="%((\.)?.*?)%"
data-cycle-caption="#slide-caption"
data-cycle-caption-template="<h1><span>[*pagetitle*]</span></h1>"
data-cycle-overlay="#slide-overlay"
data-cycle-overlay-template="<h2><span>%title% - %desc%</span></h2>"
data-cycle-prev="#slide-prev"
data-cycle-next="#slide-next"
data-cycle-pager="#slide-pager"
data-cycle-pager-template="<a href=# title=slide %slideNum%><span></span></a>"
data-cycle-pager-active-class="active"
data-cycle-loader="true"
data-cycle-swipe="true"
>
[[Ditto? &id=`slides` &parents=`123` &depth=`1` &showPublishedOnly=`1` &tpl=`slideshow-row` &tplFirst=`slideshow-row-first` &tplLast=`slideshow-row-last` &orderBy=`menuindex ASC`]]
</div>
This is the first row template (&tplFirst=`slideshow-row-first`)...
<div class="slide first" data-title="[+title+]" data-cycle-desc="[+bannertxt+]">
[+url:is=``:then=`<img src="[+image+]"[+pagetitle:isnot=``:then=` title="[+pagetitle+]"`+] alt="slideshow image" />`:else=`<a href="[+url+]"[+pagetitle:isnot=``:then=` title="[+pagetitle+]"`+]><img src="[+image+]" alt="slideshow image" /></a>`+]
</div>
This is the main row template (&tpl=`slideshow-row`)...
<div class="slide" data-title="[+title+]" data-cycle-desc="[+bannertxt+]">
[+url:is=``:then=`<img src="[+image+]"[+pagetitle:isnot=``:then=` title="[+pagetitle+]"`+] alt="slideshow image" />`:else=`<a href="[+url+]"[+pagetitle:isnot=``:then=` title="[+pagetitle+]"`+]><img src="[+image+]" alt="slideshow image" /></a>`+]
</div>
This is the last row template (&tplLast=`slideshow-row-last`)...
<div class="slide last" data-title="[+title+]" data-cycle-desc="[+bannertxt+]">
[+url:is=``:then=`<img src="[+image+]"[+pagetitle:isnot=``:then=` title="[+pagetitle+]"`+] alt="slideshow image" />`:else=`<a href="[+url+]"[+pagetitle:isnot=``:then=` title="[+pagetitle+]"`+]><img src="[+image+]" alt="slideshow image" /></a>`+]
</div>
[+ditto_iteration:gt=`1`:then=`
<div id="slide-prev" title="previous slide"><span></span></div>
<div id="slide-next" title="next slide"><span></span></div>
<div id="slide-pager"></div>`+]
<div id="slide-caption"></div>
<div id="slide-overlay"></div>
Any ideas where I am going wrong?
[ed. note: nickf08 last edited this post 12 years, 10 months ago.]