I've written a simple custom function to take care of more than (>) This works fine and returns 1 or 0.
It stops working when I pass $Pos to the function when it's called withing a loop.
SilverStripe Version 3
Controller
function MoreThen($pos, $value) {
if($pos > $value) {
return TRUE;
} else {
return FALSE;
}
}
Template.ss
<% loop GalleryObjects %>
<% if Top.MoreThen($Pos,2) %>
$Pos
<% end_if %>