Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bex 444 posts 555 karma points
    Jul 13, 2010 @ 18:07
    Bex
    0

    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

  • Rich Green 2246 posts 4008 karma points
    Jul 13, 2010 @ 18:23
    Rich Green
    1

    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

     

  • Bex 444 posts 555 karma points
    Jul 14, 2010 @ 09:49
    Bex
    0

    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!

Please Sign in or register to post replies

Write your reply to:

Draft