Allow user to choose between multiple "skins/themes"
I'm not sure if i can apply the word "skin" here but it's the one I'm use to as a former DNN guy - Umbraco stole my heart :-)
What i wanna do it is have a dropdownlist somewhere on the backend where the user/admin can change the look and feel of the website applying a different theme.
What's challenging me is that part of the html is applied inside templates and macros and to get there I would need at least multiple versions of the same macro, one for each theme. Depending on the selected theme the right macro should be used.
I'm not sure if it's possible or even if I'm going on the right direction and would like to hear some opinions. I know I could use CSS to "change the themes" and acomplish it easily however, I'm not that good in css to come out with a template that can completely change it's look and feel just touching the css.
Have a think about doing it with CSS, you could end up with a nightmare of different macro's, etc which could become a pain to manage from version to version of the site.
The CSS way could be for example...
Just pass in the the 'theme' id/name into the body tag as a class.
And then you could write additional classes which would modify the existing base template.
Something like...
body.themeGreen modules { background: green; }
which if placed at the bottom on your CSS would overide/add to;
Another option using the concept of css themes is to swap out the entire style sheet based on the selected theme. In one of your macros determine the "theme" selected and add the corresponding style sheet to the header. Kind of the CSS Zen Garden concept and used by Blog4Umbraco.
Allow user to choose between multiple "skins/themes"
I'm not sure if i can apply the word "skin" here but it's the one I'm use to as a former DNN guy - Umbraco stole my heart :-)
What i wanna do it is have a dropdownlist somewhere on the backend where the user/admin can change the look and feel of the website applying a different theme.
What's challenging me is that part of the html is applied inside templates and macros and to get there I would need at least multiple versions of the same macro, one for each theme. Depending on the selected theme the right macro should be used.
I'm not sure if it's possible or even if I'm going on the right direction and would like to hear some opinions.
I know I could use CSS to "change the themes" and acomplish it easily however, I'm not that good in css to come out with a template that can completely change it's look and feel just touching the css.
Have a think about doing it with CSS, you could end up with a nightmare of different macro's, etc which could become a pain to manage from version to version of the site.
The CSS way could be for example...
Just pass in the the 'theme' id/name into the body tag as a class.
And then you could write additional classes which would modify the existing base template.
Something like...
body.themeGreen modules { background: green; }
which if placed at the bottom on your CSS would overide/add to;
.modules { height: x; width: x; background: red; }
becoming
.modules { height: x; width: x; background: red; background: green;}
Another option using the concept of css themes is to swap out the entire style sheet based on the selected theme. In one of your macros determine the "theme" selected and add the corresponding style sheet to the header. Kind of the CSS Zen Garden concept and used by Blog4Umbraco.
-Chris
You guys are right, thanks a lot.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.