Set a variable, then pass to a tag name inside a <w:for_each in loop... is this possible...

OK somewhere near the top of my page i'm setting a variable as follows

<w:var name="tag-name"><w:tags/></w:var>

later on my page in side a for_each loop i'm referencing this variable as follows

<w:if condition="in.titleposition == 1">
                       <ul class="docs">
                         <w:assets:each limit='3' tag='{{tag-name}}'>
                           <href="<w:path rendition='pop'/>" class="fancybox" title="<w:caption/> <w:var name='tag-name' />">
                           <span class="icon"><img src="<w:path rendition='icon'/>"></span>
                           <span class="name"><w:caption truncate="10 words"/></span>

It appears that the variable isn't available to my tag name in this situation, but it is available to the my title. I'm confused, shouldn't tags support nested variables?currently doesn't seem to work in the example...




Have more questions? Submit a request


  • 0
    Christopher Haupt

    Luke, I believe this was answered in a side channel, but for the forums benefit:

    The w:assets tags currently have less support for the variable substitution mechanism. One trick that will work specifically for what you want to do is listed in the cheat sheet is to use tag="var[kb:item:tag]" on your assets:each iterator.

    We'll include the variable syntax in an upcoming deployment.

Please sign in to leave a comment.
Powered by Zendesk