[thelist] style switcher in php?

MarsHall evolt at MARSorange.com
Sat Oct 26 16:14:00 CDT 2002


On Saturday, October 26, 2002, at 03:26 PM, shawn allen wrote:
> quoth MarsHall:
>> That's more secure, yes, but not the most sustainable solution.
>>
>> If you (or someone else!) ever want to add new style sheets, you/they
>> must remember to change that "predefined style sheet" code.
>
> Regardless, you've still got to change every page (or include,
> whatever) that renders the form that's used to change the stylesheet.

Perhaps, put all the CSS files in a unique directory, call it
"stylesheets".

Then generate a list of the stylesheets from a listing of that
"stylesheets" directory.

That way you get your stylesheet list and you don't have to maintain it
in your code.

Just drop a new CSS file in the "stylesheets" directory and it is
instantly available to the application.

Yeah!

Mars :)




More information about the thelist mailing list