Editor can select background color of page

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
musicscore
Power Poster
Power Poster
Posts: 444
Joined: Wed Jan 25, 2006 11:53 am
Location: Netherlands

Editor can select background color of page

Post 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
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3484
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Editor can select background color of page

Post 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
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Editor can select background color of page

Post 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!
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
musicscore
Power Poster
Power Poster
Posts: 444
Joined: Wed Jan 25, 2006 11:53 am
Location: Netherlands

[solved] Editor can select background color of page

Post by musicscore »

Thanks, I will check and let you know if I solve this probem
User avatar
timdebuurman
Power Poster
Power Poster
Posts: 891
Joined: Sun Nov 06, 2011 8:15 pm
Location: Deventer, Netherlands

Re: Editor can select background color of page

Post 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.
NextDoorMedia - Online Marketing Partner
https://www.nextdoormedia.nl
musicscore
Power Poster
Power Poster
Posts: 444
Joined: Wed Jan 25, 2006 11:53 am
Location: Netherlands

[Solved] Editor can select background color of page

Post by musicscore »

timdebuurman

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

Return to “Modules/Add-Ons”