From: Matthew M. <ma...@tu...> - 2002-10-14 13:00:31
|
Greetings, There is new code in CVS to support multiple style sheets. Here is how it works. There is a new file in the theme named browsers.txt. It contains a listing of perl search strings and the appropiate style sheet to use. For example: Opera::opera.css MSIE 5.5::explorer.css Netscape6::netscape.css The first part before the double colons is the perl search (pretty basic in this example). Afterwards is the name of the style sheet to load INSTEAD of style.css if the search is TRUE. Layout then: 1) checks for the existance of the browser.txt file. 2) if true, layout reads the file and parses the list 3) if the browser is found AND if the style sheet exists, layout puts the address of the style sheet in the {STYLE} tag 4) if no conditions are met successfully and if style.css exists, the {STYLE} tag is set to the style.css address. 5) if none of the conditions are met, {STYLE} is never initialized. Note that I removed the <link> tag and it is now echoed along with the address. I could also add a parameter to the browser.txt files so that {STYLE} will echo the entire style sheet instead of merely linking to it. That would allow for preprocessing of the style sheet before it hits the theme. Let me know what you think and I will update the documentation if all is kewl. Thanks, Matt Matthew McNaney Internet Systems Architect Electronic Student Services Email: ma...@tu... URL: http://phpwebsite.appstate.edu Phone: 828-262-6493 ICQ: 141057403 |