Hi guys,

Elements.GetElement is known to cause performance and memory issues on the 
MS system when used too often.  It is best to avoid it.

Instead of using
<%!! Context:CurrentPage.Elements.GetElement(opt_Class).GetHtml() !!%>

You can simply use the placeholder as it is
<%opt_Class%>

On Thursday, January 31, 2013 5:06:35 AM UTC-5, Daniel Petroff wrote:
>
> You could just create an additional placeholder to determine the id or 
> class value and pull that through using rendertag.
> So for example create an option list called opt_Class, then use:
> <a href="<%anc_page1%>" <%!! 
> Context:CurrentPage.Elements.GetElement(opt_Class).GetHtml() !!%>>Page 1</a>
> The option list could have something like this:
> Page 1 >>> id="on1"
> Page 2 >>> id="on2"
> Page 3 >>> id="on3"
> All other pages >>> class="otherPages"
>
> Hope this helps.
>
>
>
> On Thursday, January 31, 2013 12:40:47 AM UTC, Paul Sampson wrote:
>>
>> We have a basic CSS menu on our site which sets the position of the 
>> background image depending on which page we're on.
>>
>> The code below checks the page's headline and applies the appropriate CSS 
>> id which contains the correct background position. However, this doesn't 
>> hold up well if the user changes the headline or reorders the pages, etc.
>>
>> Is there a better way to achieve the same result?
>>
>> <li id="nav_1">
>> <a href="<%anc_page1%>"<reddot:cms><if><query 
>> valuea="Context:CurrentPage.Elements.GetElement(hdl_Headline).GetHtml()" 
>> operator="" valueb="Page 1"><htmltext>id="on1"</htmltext></query></if><
>> /reddot:cms>title="Page 1">Page 1</a>
>> </li>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reddot-cms-users+unsubscr...@googlegroups.com.
To post to this group, send email to reddot-cms-users@googlegroups.com.
Visit this group at http://groups.google.com/group/reddot-cms-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to