I have a few folders in my umbraco, with each one having a different domain assigned to it, each domain has a theme assigned to it, which is stored in a database.
So when a page loads I need to be able to set the theme in the code by doing page.theme=...
Having done this previously outside umbraco I have just set the OnPreInit of a base page that all pages inherit from, but how on earth do I do this in umbraco?
Do I need to edit the core code? or is there some other way of doing this that is already implemented?
One solution would be that if your existing themes are just using different stylesheets and images, then you can just store this info in an umbraco field and use a macro to load the correct stylesheet within your master template.
Setting Page theme Via Code
Hello!
I have a few folders in my umbraco, with each one having a different domain assigned to it, each domain has a theme assigned to it, which is stored in a database.
So when a page loads I need to be able to set the theme in the code by doing page.theme=...
Having done this previously outside umbraco I have just set the OnPreInit of a base page that all pages inherit from, but how on earth do I do this in umbraco?
Do I need to edit the core code? or is there some other way of doing this that is already implemented?
Thanks
Bex
One solution would be that if your existing themes are just using different stylesheets and images, then you can just store this info in an umbraco field and use a macro to load the correct stylesheet within your master template.
Essentially just switch out the style sheets.
Rich
Thanks for you reply..
Surely there is a way of just setting the theme though?
Please contine in this post http://our.umbraco.org/forum/developers/api-questions/10641-Setting-Page-theme-Via-Code
My post has posted TWICE again.. for some reason they always do!
is working on a reply...