Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Initialization when ContentReference.StartPage is ready

Vote:
 

I need todo a few checks when ContentReference.StartPage is ready. Can I somehow hook up on that event?

#85955
May 09, 2014 11:10
Vote:
 

All should be ready if you use this ModuleDependency:

[ModuleDependency(typeof(EPiServer.Web.InitializationModule))]
#85958
Edited, May 09, 2014 11:44
Vote:
 

Almost.. ContentReference.StartPage. is not ready in that code..

#85982
May 09, 2014 14:58
Vote:
 

ContentReference.StartPage is resolved from the http request. See http://world.episerver.com/Blogs/Johan-Bjornfot/Dates1/2013/12/Multisite-feature-in-EPiServer-75/

You can in admin mode (under Manage WebSites) add host name '*' (wildcard host) to a site. Then that site will be returned as SiteDefinition.Current (and hence also ContentReference.StartPage) when a site can not be resolved from the request (either when there is no request or the host of the request does not match any site).

#85984
May 09, 2014 15:17
* 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.