GetSimple Support Forum

Full Version: Different theme/html for every page?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is one of the best and simple CMS I discovered! 
My question: Is it possible to give every page a different background color or even a complete new theme? I really like the possibility to edit the html but unfortunately I didn't saw an option to do that seperetaly for every page. 
Thank you!
(2018-04-30, 13:09:31)gsmoel Wrote: [ rel="nofollow" -> ]This is one of the best and simple CMS I discovered! 
My question: Is it possible to give every page a different background color or even a complete new theme? I really like the possibility to edit the html but unfortunately I didn't saw an option to do that seperetaly for every page. 
Thank you!

First install the addons i18n and i18n custom fields. Then you define a custom field named "backgroundcolor". Now you'll find in the "page options+" on "edit page" a field in which you type in the wanted background-color - e.g. red, #ff0000, rgb(255,0,0).

In your template write in the <head>-section this
Code:
<style>
body { background-color: get_custom_field('backgroundcolor'); ?>
</style>

Alex
You can also use components if you plan on having a few or want to do dynamic code driven code.
(2018-04-30, 18:36:24)Alexander_ Wrote: [ rel="nofollow" -> ]
(2018-04-30, 13:09:31)gsmoel Wrote: [ rel="nofollow" -> ]This is one of the best and simple CMS I discovered! 
My question: Is it possible to give every page a different background color or even a complete new theme? I really like the possibility to edit the html but unfortunately I didn't saw an option to do that seperetaly for every page. 
Thank you!

First install the addons i18n and i18n custom fields. Then you define a custom field named "backgroundcolor". Now you'll find in the "page options+" on "edit page" a field in which you type in the wanted background-color - e.g. red, #ff0000, rgb(255,0,0).

In your template write in the <head>-section this
Code:
<style>
body { background-color: get_custom_field('backgroundcolor'); ?>
</style>

Alex

Thanks for reply Alex, I did everything you said but it didn't work. Do I have to do something else like different type customfield? I chose textfield... Or is it overwritten by the default css file of the theme? Please help me Thank you!
Code:
<style>
body { background-color: <?php get_custom_field('backgroundcolor'); ?>;}
</style>
The other "traditional" way that I see no one mentioned is having several templates in the theme.

- You make a copy of template.php to, say, template2.php
- Edit template2.php and make changes (insert your custom background css or whatever)
- Edit the page in which you want to change the background color and select template2.php instead of the default template.