I need to show a block of content if the total items for a control is greater than a certain number. I know that if I output $getDirectoryEntries.TotalItems it returns the right value.
I hoped the following would work:
<% if getDirectoryEntries.TotalItems > 10 %>Bla bla<% end_if %>
But then I found out that the template engine doesn't support greater than or less than comparators.
I then tried the following:
<% if showItemsControl(getDirectoryEntries.TotalItems) %>Bla bla<% end_if %>
function showItemsControl($totalitems) {
if ($totalitems > 10) {
return true;
} else {
return false;
}
}
But that throws the same error (syntax error, unexpected '}'). Is this because of the order of rendering the templates?
Can anyone shed a little light on how to do this?
Cheers
Les