Emil’s Blog

Programming Windows, .Net, EPiServer and whatnot…

[Powered by WordPress.]

July 10, 2007

Get the Url to the EPiServer start page incl. language branch

by @ 9:14. Filed under EPiServer

This is how to retrieve the address to the startpage including the currently active language branch (e.g. "/sv/" or "/en/"):

PageData pagedata = Global.EPDataFactory.GetPage(Global.EPConfig.StartPage);
string url = pagedata.DetermineAutomaticURL(LanguageContext.Current.CurrentLanguageBranch);

This code looks simple but it actually took me an hour or so to get it right (I haven't worked with globalization before) so I thought it'd make a good blog post...

/Emil

[powered by WordPress.]

jour·nal n. A personal record of occurrences, experiences, and reflections kept on a regular basis; a diary.

Internal links:

Categories:

Search blog:

Archives:

July 2007
M T W T F S S
« May   Sep »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  


View Emil Åström's profile on LinkedIn

General links:

I read:

Visitors

Recent Comments

Spam caught

Other:

Clicky Web Analytics

36 queries. 0.377 seconds