AI OnAI Off
ServiceLocator.Current.GetInstance<IContentLoader>().Get<StartPage>(PageReference.StartPage).LinkUrl;
Something like this (from memory).
Frederik
If you want to force the language part (e.g. you're visiting the website without any language in the url):
protected string StartPageUrl
{
get
{
return "/" + ServiceLocator.Current.GetInstance<ILanguageBranchRepository>().Load(ContentLanguage.PreferredCulture).CurrentUrlSegment + "/";
}
}
Try this:
<EPiServer:Property PageLink="<%# PageReference.StartPage %>" PropertyName="PageLink" runat="server">
/HaBui
I have a logo in my root layout that needs to link to the start page with the correct language.
How do I set the href the correct way?