Try our conversational search powered by Generative AI!

Link property and globalization


I have trouble making Link property to work on globalized site. When selecting the link I choose Page on this website, Language : automatically. But when I output that property in PageList using Container.CurrentPage.Property["MyLink"], the url isn't "friendly" and also it's missing the language, resulting in page not found error.

Since these links can be external and internal, I can't use Page property either. Nor have I been able to figure out how to turn the Link property to PageReference/PageData in order to form the final link in code-behind.

Aug 26, 2008 9:46
Did you solve your problem? I have the same one.
Sep 23, 2008 10:59

PageReference.ParseURL(..) will get the right pageref, not sure if it casts exception or returns a PageReference.EmptyReference if it fails.

Sep 24, 2008 9:38

Bumping this. I too have a similar problem. When you choose "Automatically" for language and print it using CurrentPage[] the language is ignored in the friendly url, resulting in a 404.

I have no use for ParseUrl()

Mar 03, 2009 14:54

Any news about this? I have the same problem very sporadically on a site (CMS 5 R2 SP2) with a bunch of languages activated. The Llanguage code vanishes, and the resulting page has a mixture of languages on it (we have enabled fall-back to master language).

Feb 22, 2010 14:39


Apr 12, 2011 14:58

I guess that the issue has been fixed in a later release because it works when I test this on a CMS 6 R2 site for a bunch of different ways to write the value:

<div id="MainBody">
        <%=CurrentPage["Links"] %>
        <%=CurrentPage.Property["Links"] %>
        <%=CurrentPage.Property["Links"].ToWebString() %>
    <EPiServer:Property runat="server" PropertyName="Links" />

Has anyone reproduces this on a CMS 6 R2 environment?

Apr 13, 2011 20:14
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.