London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
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.
<a href="/"> <img class="logo" src="/static/img/logo.png" alt="Company name" /> </a>
How do I set the href the correct way?