Render tag conditional question

61 views
Skip to first unread message

Dmitry Terner

unread,
Jun 27, 2011, 4:03:40 PM6/27/11
to reddot-c...@googlegroups.com
Any reason this won't work?

               <reddot:cms>
                    <if>
                        <query valuea="<%!! Context:CurrentPage.Elements.GetElement(stf_Nav).GetHtml() !!%>" operator="!=" valueb="Str:Industry">
                            <htmltext>Test</htmltext>
                        </query>
                    </if>
                </reddot:cms>

Using <%!! Context:CurrentPage.Elements.GetElement(stf_Nav).GetHtml() !!%> by itself does show that some pages have the "Industry" string so that seems to work but the conditional does not.

Thanks,

- Dmitry

Tony Gayter

unread,
Jun 27, 2011, 4:57:52 PM6/27/11
to reddot-c...@googlegroups.com
You dont need teh shortcut tags.

               <reddot:cms>
                    <if>
                        <query valuea="Context:CurrentPage.Elements.GetElement(stf_Nav).GetHtml()" operator="!=" valueb="Str:Industry">

Steven Brent

unread,
Jun 28, 2011, 9:06:02 AM6/28/11
to reddot-c...@googlegroups.com
That's right -- when you're evaluating (as opposed to rendering) a page property, you want it to look like this:

Dmitry Terner

unread,
Jun 28, 2011, 10:07:41 AM6/28/11
to reddot-c...@googlegroups.com
Ah I see. Thank you so much.

Steven Brent

unread,
Jun 28, 2011, 8:53:56 PM6/28/11
to reddot-c...@googlegroups.com
Rock on :-)

Jian Huang

unread,
Jun 29, 2011, 8:46:24 AM6/29/11
to RedDot CMS Users
Hi Dmitry,

Is the rendertag code used in navigation template or inside a regular
content class?

If it is inside a regular content class, it is more performant to use
the stf_Nav directly inside if conditional rendertag

<reddot:cms>
<if>
<query valuea="<%stf_Nav%>" operator="!=" valueb="Str:Industry">
<htmltext>Test</htmltext>
</query>
</if>
</reddot:cms>

-Jian

[I am now on http://www.solutionexchange.info/]


http://www.solutionexchange.info/
Reply all
Reply to author
Forward
0 new messages