Cycleshow

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

Re: Cycleshow

Postby winters » Sun Jan 17, 2016 7:16 pm

hi harm,

I used the following with around 80 entries in pivotx but get the error underneath.

The prev. code above for 1 entry works great.

do you or anyone have an idea what I do wrong?

<div class="[[ cycleshow ]]">

[[ subweblog name="wall" amount=12 order="random" category="" ]][[ literal ]]

[[ title ]][[subtitle]] -
[[ if (!empty($entry.extrafields.photo_wall)) ]]
<img class="plaque-small-text-img" width="55" height="55" align="left" src="images/[[$entry.extrafields.photo_wall]]" >
[[/if]]

[[ /literal ]][[ /subweblog ]]
</div>

getting the error [cycle] terminating; too few slides: 1

thanks
willem
winters
 
Posts: 82
Joined: Thu Jan 13, 2011 9:09 pm

Re: Cycleshow

Postby Harm10 » Sun Jan 17, 2016 7:57 pm

If you code it like that it will not work in groups.
You need to define the group and give it a parent element. On that element you code another parent element with cycleshow.
Cycleshow will locate the first child element and cycle that.
I have added a group example to my site to show that it works: http://www.remark-webdesign.nl/page/cycleshow-en/remarkwebdesignen

So suppose your 12 entries all have that image you need to add the cycleshow code head element on the first one, add another element to each first one of a group, close that element after the last one of the group and close the cycleshow element after the last group.

Structure needs to be:
Code: Select all
cycleshow start
group start
group member
group member
group member
group member
group end
group start
group member
group member
group member
group member
group end
group start
group member
group member
group member
group member
group end
cycleshow end

You will have a cycleshow of 4 images displayed at once and 3 revolving groups.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2010
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Previous

Return to 2.x Extensions

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest

cron