-
☆ A M B ☆
- 209 Posts
I'm trying to institute a parameter similar to &tplOdd in getResources for in getImageList.
I figured I could do a conditional within the &tpl chunk to check if the idx number was even or odd, but I can't figure out a way to do so. What I came up with is below:
[[+idx:isOdd=`0`:then=`<div class="row">`]]
<?php
$number = $input;
$odd = 1;
$even = 0;
if( $number = $number%2 ) {
return $odd;
}
else {
return $even;
}
[ed. note: maroonlover last edited this post 12 years, 7 months ago.]
Ben Morrison
Hacking templates to pieces since 2003
discuss.answer
you can either use the property
or the placeholder
[[+_alt:is=`1`:then=``:else=``]]
any equivalent for tplLast?
Quote from: pjldesign at Sep 29, 2015, 07:54 PMany equivalent for tplLast?
yes, its