Try our conversational search powered by Generative AI!

How to link to start page?


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" />

How do I set the href the correct way?

Dec 02, 2013 21:03

Something like this (from memory).


Dec 02, 2013 22:20

If you want to force the language part (e.g. you're visiting the website without any language in the url):

protected string StartPageUrl
        return "/" + ServiceLocator.Current.GetInstance<ILanguageBranchRepository>().Load(ContentLanguage.PreferredCulture).CurrentUrlSegment + "/";


Dec 03, 2013 0:35

Try this:

<EPiServer:Property PageLink="<%# PageReference.StartPage %>" PropertyName="PageLink" runat="server">




Edited, Dec 03, 2013 7:42
Edited, Dec 03, 2013 10:38
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.