November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
It seems that the only solution that we've found is via SiteDefinitionRepository. You will not get the Current SiteDefininiton but all possible values.
var siteDefinitionRepository = ServiceLocator.Current.GetInstance<SiteDefinitionRepository>(); var siteDefinitions = siteDefinitionRepository.List().ToList();
We are trying to acces `SiteDefinition.Current` at the time of `AfterInstall`. What we need is `SiteUrl` and `Id` but it seems that at the time of this event they are not available.
How can we postpone the calling of `AfterInstall` or otherwise, could we attach an event listener in `AfterInstall` that can later in the pipeline provide us the data?
Update:
From what I can see in the documentation and from here (enumerating the order of the execution of dependencies), decorating the class like the following should have EPiServer.Web initialized, and by extent, SiteDefinition.Current.
I first add the following attributes to the class with no results.
Adding a event handler to the InitComplete still doesn't get the values: