Hi,
I hope someone can help me. I am php illiterate...sorry. I am designing a site with multiple color variations available. Currently I have to change the template of every resource if someone chooses another color. I am searching for a simple script or snipit that would create a drop down in the resource editor, where the user could simply select their choice of color from a list and the script would dynamically change one word in the headerchunk which is the stylesheet name. The one word in the header (such as blue, green, or red) is the only difference in the html for the templates. It would be best if this could be accomplished by a manager user with minimal permisssions. Please advise.
Thanks
Do you know if there is a way to make it site wide for all templates and pages?
-
☆ A M B ☆
- 24,524 Posts
Do you mean that editing its value in one page will change it for the default? No, that’s not how it works. Editing on a single page only changes it for that page, and if it’s a parent and the default is @INHERIT, for its children.
However, you could use a plugin, using OnDocFormSave, to change the TV’s default value to match the one set for the document.
would that allow a change made to one resource to change all of the other resources in the site tree. My objective is to find a simple way to change themes without repetition. Such as changing the color by linking to alternate stylesheets from the header chunk which would be made sitewide.
How do I find the plugin you mentioned "OnDocFormSave" and accompanying documentation? I am unable to find it by searching extras or by the search feature.
Thanks for your help!
Doesn’t DocManager allow you to change multiple TV values? That might be easier than trying to write a plugin.