Hi Andreas,

I have to respectfully disagree.

Using rendertag to check anchor element fails when the anchor is
referencing a page.  However, if a page is connected to the anchor, it
is likely that the page is connected else where too.  A project with
pages containing multiple connection will have publication and
performance issues.

Secondly, the CurrentPage rendertag is memory intensive as it has to
load the entire page into memory before it can access the page
elements.  Second this is also within navigation template code, it is
likely that the check will get conducted on multiple pages.  The next
topic is memory management and garbage collection...

Metarefresh might not be SEO friendly, but it can be fixed via robot
no and index -1 meta tags in the page.

Javascript redirect might not be noscript friendly.

Ultimately, the choices are:

A complicated and slow content management system or a or an ok web
page out of 1000 web pages in the site.

-Jian



On Apr 20, 2:56 pm, Andreas Thumfart <[email protected]> wrote:
> You can add an anchor element to your masterpage and check in the navigation
> template if this anchor is linked to any page.
> If it is, write the anchor instead of the url of the current page into your
> navigation template.
> Works much better than using JavaScript or a meta refresh.
>
> And if you check the render mode too, you can give the editors access to the
> page in smartedit if the redirect is set.
>
> example code:
> <if>
>   <query
> valuea="Context:CurrentPage.Elements.GetElement(anc_redirect).GetHtml()"
> operator="==" valueb="Escape:EmptyString">
>     <htmltext>
>       <a href="<%!! Context:CurrentIndex.GetUrl() !!%>"><%!!
> Escape:HtmlEncode(Context:CurrentPage.Headline) !!%></a>
>     </htmltext>
>   </query>
>   <query type="else">
>     <if>
>       <query valuea="Context:CurrentRenderMode" operator="=="
> valueb="Int:1">
>         <htmltext>
>           <a href="<%!! Context:CurrentIndex.GetUrl() !!%>"><%!!
> Escape:HtmlEncode(Context:CurrentPage.Headline) !!%></a>
>         </htmltext>
>       </query>
>       <query type="else">
>         <htmltext>
>           <a href="<%!!
> Context:CurrentPage.Elements.GetElement(anc_redirect).GetHtml() !!%>"><%!!
> Escape:HtmlEncode(Context:CurrentPage.Headline) !!%></a>
>         </htmltext>
>       </query>
>     </if>
>   </query>
> </if>

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/reddot-cms-users?hl=en.

Reply via email to