GetSimple Support Forum
Different theme/html for every page? - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: Different theme/html for every page? (/showthread.php?tid=10465)



Different theme/html for every page? - gsmoel - 2018-04-30

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!


RE: Different theme/html for every page? - Alexander_ - 2018-04-30

(2018-04-30, 13:09:31)gsmoel Wrote: 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


RE: Different theme/html for every page? - shawn_a - 2018-05-01

You can also use components if you plan on having a few or want to do dynamic code driven code.


RE: Different theme/html for every page? - gsmoel - 2018-05-01

(2018-04-30, 18:36:24)Alexander_ Wrote:
(2018-04-30, 13:09:31)gsmoel Wrote: 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!


RE: Different theme/html for every page? - Oleg06 - 2018-05-01

Code:
<style>
body { background-color: <?php get_custom_field('backgroundcolor'); ?>;}
</style>



RE: Different theme/html for every page? - Carlos - 2018-05-01

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.