CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 dynamic change of styles

Print topic Send  topic

Author Message
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">

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.