Page 1 of 1

Editor can select background color of page

Posted: Sat Dec 03, 2016 3:59 pm
by musicscore
I'm creating a website and I want to give the page editors a dropdown selecting when they are editing a page where they can select the background color of that page. The selections should be : White, Grey, Transparent.

Can I add a dropdown selection in the page editor (TinyMCE).

TIA

Re: Editor can select background color of page

Posted: Mon Dec 05, 2016 12:06 pm
by velden
In my opinion it doesn't belong to TinyMCE but should be a separate content block.

E.g.:
http://dev.cmsmadesimple.org/projects/ecb2

Re: Editor can select background color of page

Posted: Mon Dec 05, 2016 1:01 pm
by Rolf
Or use default template features like
http://www.cmscanbesimple.org/blog/the- ... gn-manager
Trust me! Invest some time in it and you will be impressed by the endless new features you can build. And it will cost you less time to build it!

[solved] Editor can select background color of page

Posted: Mon Dec 05, 2016 8:34 pm
by musicscore
Thanks, I will check and let you know if I solve this probem

Re: Editor can select background color of page

Posted: Sat Dec 10, 2016 3:37 pm
by timdebuurman
Indeed is the template inheritance an awesome solution!! I tried it some months ago and use the technic in all my projects since.

But to also answer this specific question:

I would install the module CGContentUtils and make a new content block of the type dropdown with the needed values.
In the template you can define a class, according to the value of the new content block.
Something like:

Code: Select all

{content_module module='CGContentUtils' block='name_of_block' label='Choose background color' assign='chosenbg'}
<div id='someblock' class='{$chosenbg}'>
Then ofcourse apply the background color to the class in the stylesheet.

[Solved] Editor can select background color of page

Posted: Tue Dec 13, 2016 7:04 am
by musicscore
timdebuurman

I tested this and YES it works.
Thanks for saving my day.