-
☆ A M B ☆
- 2,213 Posts
You could try calling the limit uncached as well, so [[!+total:decr]].
Thanks for the suggestion, unfortunately no joy though. Is there a way to strip the last character from a TV output?
-
☆ A M B ☆
- 2,213 Posts
Why not simply set the limit to 5 if that's what you are trying to accomplish, or simply not add the last slide in the first place?
try this snippet:
<?php
$items = $modx->fromJson($value);
return count($items)-1;
use it like that:
[[getImageList?
&tvname=`homepage-slider`
&tpl=`slider-tpl`
&offset=`0`
&limit=`[[getLimit? &value=`[[*homepage-slider]]`]]`
]]
Thanks Bruno, that worked a treat!