Hi Steve,

When it comes to rendertag, it is not recommended to use rendertag to get 
the element value.  The reasons are explained in other threads in this 
forum.  If you want to compare an element value from the same page, simply 
throw the placeholder into the rendertag if statement.

Yes, there is a rendertag solution for figuring out even or odd, but it 
consists of 5 if statements, I think it is somewhere here in this forum 
too, or solutionsexchange.info.

No, there is no math operation in rendertag.

For what you wanted to do, it can be solved more easily using 
JavaScript/JQuery

$('#mylist div:even').addClass('even');
$('#mylist div:odd').addClass('odd');

Best,

-Jian

On Friday, April 4, 2014 8:04:24 PM UTC-4, Steve Ranger wrote:
>
> I've figured out how to do very basic stuff like get the value of an 
> element and use an if statement but I cannot for the live of me figure out 
> if there is a way to do any kind of simple math.
>
> As an example I'd like to replace ASP code that counts the number of items 
> in a LIST element and then automatically create to list on the final page 
> with half on the left and half on the right.
>
> In ASP I just count the number in the list (which I'd use a foreach with 
> count in Render tag to do) but then I have seen no examples of any kind of 
> math that would let me divided that number in two and decided how many to 
> output on the left and right.
>
> Can you even do simple math in Render Tags?
>
> Thanks in advance.
> Steve
>

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reddot-cms-users+unsubscr...@googlegroups.com.
To post to this group, send email to reddot-cms-users@googlegroups.com.
Visit this group at http://groups.google.com/group/reddot-cms-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to