quick render tag question

55 views
Skip to first unread message

Dmitry Terner

unread,
Aug 11, 2011, 10:57:07 AM8/11/11
to reddot-c...@googlegroups.com
In my navigation template I want to grab the content of an element that is on the page I though it should work like this:

<%!! Context:CurrentIndex.Elements.GetElement(stf_navTitle).GetHtml() !!%>

but it doesn't. Just to be sure I added this:

<%!! Context:CurrentMasterPage.Elements.GetElement(stf_navTitle).GetHtml() !!%>

and that works for the current page but not the pages rendered by navigation manager .

any ideas on what I am doing wrong?


Ps here is the entire navigation template, instead of headlien I want to use a custom element:

            <li class="overlay">
                    <a href="<%!! Context:CurrentIndex.GetUrl() !!%>"><%!! Context:CurrentIndex.Elements.GetElement(stf_navTitle).GetHtml() !!%></a>
                    <reddot:cms>
                       <if>
                        <query valuea="Context:CurrentIndex.HasChildren()" operator="==" valueb="Bool:True">
                          <htmltext>
                            <ul>
                                <navigation:nextlevel>
                            </ul>
                          </htmltext>
                        </query>
                     </if>
                    </reddot:cms>
                 </li>




Thanks,

- Dmitry

Tony Gayter

unread,
Aug 11, 2011, 11:20:27 AM8/11/11
to reddot-c...@googlegroups.com
Try

<li class="overlay">
<a href="<%!! Context:CurrentIndex.GetUrl() !!%>"><%!! Context:CurrentPage.Elements.GetElement(stf_navTitle).Value !!%></a>

Dmitry Terner

unread,
Aug 11, 2011, 11:48:46 AM8/11/11
to reddot-c...@googlegroups.com
Perfect. Thank You.

Jian Huang

unread,
Aug 11, 2011, 1:18:27 PM8/11/11
to RedDot CMS Users
Oops, I guess I am too late to the party.

Best practice: CurrentIndex.Page instead of CurrentPage

On Aug 11, 11:48 am, Dmitry Terner <dmi...@terner.ws> wrote:
> Perfect. Thank You.
Reply all
Reply to author
Forward
0 new messages