LETTING CLIENTS CHOOSE THEIR OWN COLOR SCHEME AND OTHER PAGE PARAMETERS - Sep 17th, 2014


If you want your client to be able to set various page parameters themselves, here;s one approach:

This example is about page background colors (or any other color choices)

Create a multi record editor (I called it “Color Choices”) with only 2 text fields: Color (I.E.: Red, Blue, Green,
etc.) and HEX Color( I.E. FF0000, 00FF00, 0000FF) with no # sign (if your client will have access to this editor you
might want to limit input to min and max characters 6 and only allow the characters AaBbCcDdEeFf1234567890 since others
are not valid in hex code. (or you can choose to not show the editor in the menu under advanced options)
Create a record for each color you want to allow.

Then create a single record editor called “clients choices” and in that editor create a list field called “Page
Background” that gets its options from the database “Color Choices” with the option values from the
“hex_color” field and the option labels from the “color_choices” field

Last, where you want the color choice in your viewer, (I.E. body bgcolor=), insert the <body bgcolor="#<?php echo
$client_choicesRecord[‘page_background'] ?>">

You can use the “Color Choices” editor values for any colors on your viewers by adding another list field in the
“Client Choices” editor. Just name the list fields appropriately so you can keep track of them all.

The concept will also work for any other parameters as well (fonts, etc). Just create a new multi record editor for each
set of parameters that are not colors, and add another appropriately named list field to the “client choice” single
record editor.



The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service