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.
PageReference.ParseURL(..) will get the right pageref, not sure if it casts exception or returns a PageReference.EmptyReference if it fails.
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()
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).
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"] %> </div> <div> <%=CurrentPage.Property["Links"] %> </div> <div> <%=CurrentPage.Property["Links"].ToWebString() %> </div> <EPiServer:Property runat="server" PropertyName="Links" />
Has anyone reproduces this on a CMS 6 R2 environment?