#assign directive
Hi there,
Could someone please have a look at the following snippet?
<#assign latestTopicsTabIndex = 402 />
<#list latestTopics.message as message>
...
...
...
<a class ="messageSubject" href="${message.@view_href}" tabindex="$(latestTopicsTabIndex)"> ${message.subject}</a>
<#assign latestTopicsTabIndex = latestTopicsTabIndex + 1 />
</#list>
I'd like to know what's wrong with my syntax, as I'm getting this when the page renders
<a tabindex="$(latestTopicsTabIndex)" href="http://h30500.www3.hp.com/t5/general/General-Test/m-p/666#M1" class="messageSubject"> General Test $(latestTopicsTabIndex) </a>
instead of
<a tabindex="402" href="http://h30500.www3.hp.com/t5/general/General-Test/m-p/666#M1" class="messageSubject"> General Test $(latestTopicsTabIndex) </a>
Thanks in advance,
Luis
Looks like you may be using parentheses instead of curly brackets for that variable.
Instead of this:
$(latestTopicsTabIndex)
Try this:
${latestTopicsTabIndex}