Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > External Links in navigation? View modes: 
User avatar
Member
Member
vcarter - 5/7/2013 2:14:05 PM
   
External Links in navigation?
Is creating a blank doc with a redirect really the only way to do this in Kentico? Seems particularly inefficient to me.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 5/7/2013 9:09:44 PM
   
RE:External Links in navigation?
If you want to take advantage of the viewers and navigation web parts, yes. If not, simply put some static HTML in, kinda defeats the purpose of a CMS though.

User avatar
Member
Member
vcarter - 5/8/2013 8:32:32 AM
   
RE:External Links in navigation?
I am going to try and use DocumentMenuRedirectUrl in my transformation, swapping it in when there is a value.

User avatar
Member
Member
vcarter - 5/8/2013 1:02:54 PM
   
RE:External Links in navigation?
Ok I want to do something like this:

{% if( DocumentMenuRedirectURL == "") {ResolveMacros("\r\n<li><a href=\"{% getDocumentURL() %\}\">{% DocumentName %\}</a>\"</li>\r\n") }else {ResolveMacros(" \r\n<li><a href=\"{% DocumentMenuRedirectUrl %\}\">{% DocumentName %\}</a></li>\r\n") } %}

Having trouble checking for a DocumentMenuRedirectURL value, any suggestions. I normally would check string length but that does not seem to work in this instance.


User avatar
Member
Member
vcarter - 5/8/2013 3:11:30 PM
   
RE:External Links in navigation?
Just a heads up found this article:

Navigation Menu Universal Viewer

And this syntax worked:

<li style="font-weight:bold;"><a href="<%# IfEmpty(Eval("DocumentMenuRedirectUrl"),GetDocumentUrl(),Eval("DocumentMenuRedirectUrl")) %>" <%# IfEmpty(Eval("DocumentMenuJavascript"),""," onclick=\""+Eval("DocumentMenuJavascript")+"\"") %>><%# IfEmpty(Eval("DocumentMenuCaption"),Eval("DocumentName"),Eval("DocumentMenuCaption")) %></a></li>

Not sure why the text/xml syntax wasn't working, but found a solution nonetheless.