RuKl@Neckarstadt.net
|
Posted: 01/24/2002, 1:39 PM |
|
I want to dynamically assign predefined styles/templates to pages dependant on the domain or user from which the page is called. Maybe there are different websites (domains) which call a bugtrack-page. There is only one backend database and one set of pages and forms which are used from all sites - different companies - or users, which want to have customized/personalized outfits. The outfits are predefined in styles and templates.
thx
rukl
|
|
|
Nicole
|
Posted: 01/25/2002, 4:09 AM |
|
Hello,
I suppose there's workaround for template version. First of all you should create several custom .css file with the same structure as Site.css file generated by CC. Of course the site itself should be generated with 'Generate File containing Styles' option selected (Site/Style). Then you should create Custom Show Page event for each page you want to use different styles. Add there code like:
ASP
if condition_to_load_any_css then
SetVar "Style", "My1.css"
else
SetVar "Style", "My2.css"
end if
PHP
if (condition_to_load_any_css)
$tpl->set_var("Style", "My1.css");
else
$tpl->set_var("Style", "My2.css");
The last step is to edit generated .html file. Open it and modify the line where style file is defined to get:
<link rel="stylesheet" href="{Style}" type="text/css">
|
|
|
|