Quick bit of advice which I'm sure will be an easy one for you all.
We've been using Property Type -> 'URL to page/external addres' to link href's on pages to other pages within our EPiSERVER site, however now have the interesting challenge where these links are being rendered without the /en/ or other country information in the URLs.
Rather than writing our own custom function to grab the Properties as Pages (say by setting them as Type 'Page') is there a _recommended_ way/Property Type to use that keeps true to the current language by default?
Sure it's obvious but not so far to us! Alex
.. and to give a couple of examples:
<%# CurrentPage.Property["OurOtherPageLink"] %>
produces a nice SEO friendly URL but with no Globalisation and
<EPiServer:Property ID="OurOtherPageLink1" PropertyName="OurOtherPageLink" runat="server" />
products an internal looking URL with the .aspx on the end and the page ID as a get parameter.
What we'd like to get is as the first one, with a nice SEO friendly URL, but also include the Globalisation information :-)
Use the Page property type for this.
Thanks Frederik - so should have had you come and help us out with this job :-)
Do you have an example to share?
Hehe, seems you're doing alright by yourself :).
Simply use the EPiServer property control to render the url.
You can also use it in your code-behind.
var myPageReference = (PageReference)CurrentPage["MyPageProperty"];
var myPage = GetPage(myPageReference);
myPage.LinkURL gives you the url.
Hope this helps.
We're learning fast :-) [largely thanks to your great blog posts :->]
As you couldn't make this gig, drinks on me in London next time you are over :-) :-)
Haha, I'll take you up on that one! :)