I am not sure I understand exactly what you want to achieve but EPiServer.Web.SiteDefinition contains information as RootPage (the root of the whole content tree, seen as the Root in the UI page tree), GlobalAssetRoot (the root for all assets such as blocks/media, seen as root in Blocks/Media gadget), SiteAssetRoot (if the site has defined a specific asset root).
You can get all site definitions from EPiServer.Web.ISiteDefinitionRepository.List (repository is registered in IOC container) or the current site if you get type SiteDefinition from container (or uses static property EPiServer.Web.SiteDefinition.Instance)
thank you for the asnwer.
What I am trying to achieve is let the user of my admin tool pick up the root page dynamically.
I can specify the contentreference in one of the properties in the settings page and then retrieve it from there.. but it is cumbersome, as a user has first set the root in the settings page then return to the admin tool.
instead i would have the button 'select the root under which the pages will be created', the user selects the root page from the tree and continue working.
So, basically i need to open the 'select the page' dialog from the code. How can I do it?
I wonder how I can open the media library for picking up the root content reference element from the admin tool I am developing?
Same goes how to open the pages explorer, so i can set up the root content reference for the pages.
thank you for any pointers,