Search This Site

Custom Search

Tuesday, January 4, 2011

[bloggerDev] Documentation on expr: ?

I'm having a hard time understanding exactly what expressions are
supported within the expr:xxx value. What "language" are these in and
exactly what operations are supported? I have failed to find official
documentation on this, and any pointers would be appreciated.

In particular, the problem I face is trying to concatenate what I
believe to be a string to what is probably an integer in order to
create alternating styles for an array of objects, as follows:
1: <b:loop index='i' values='data:posts' var='post'>
2: <div expr:class='&quot;post-&quot; + data:i % 2'>
3: <b:include data='post' name='post'/>
4: </div>
5: </b:loop>

However, this does not work: the widget within which this is located
fails to show.

Substituting line 2 with <div expr:class='&quot;post-&quot; + data:i'>
causes the code to work as expected.

What's going on? I have checked that the modulo operator is supported.
Parentheses do not fix this.

Thanks.

--
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To post to this group, send email to bloggerdev@googlegroups.com.
To unsubscribe from this group, send email to bloggerdev+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bloggerdev?hl=en.

No comments:

Post a Comment