CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 CCS and Customizable Themes

Print topic Send  topic

Author Message
Srinivas
Posted: 12/30/2003, 9:00 PM

Hello

Quoting from:
http://www.gotocode.com/disc_viewt.asp?mid=25203&

Quote :
The "Template" class is responsible for loading the templates. Does any one play with modifying or extending this template class to change its behavior? Especially I would like to "load" a template and REPLACE any occurance of certain TAGs globally before handing the 'template' to the PAGEs. For example, if I have {skin} as my theme-tag, I would like to replace this tag at the time of LOADING the template and then hand over the modified "CONTENT" to the PAGE for further processing.

Can this be doable? Is it done before? Thank you in advance.

Thanks in advance.

-Srinivas
lneisius

Posts: 29
Posted: 01/07/2004, 4:44 AM

If I understand, then replacing the theme tag is a simple set tag action in the before show event for the page. What I did is a search and replace of the theme in the html example replace Sulfur with {Theme} then in the before show event for the page do a right click and select add action then when actions pop up select set tag then fill in the data. I have asked support for a global set tag action and it was passed on to the development team but so far no global functions. With this method it will have to be added to every page with the dynamic theme. Hope this helps
View profile  Send private message
srinivas

Posts: 54
Posted: 01/09/2004, 1:13 PM

Thanks that works too. I dont know about every one, but I usually start off with the basic structure and then start doing quite a bit of "manual" edits to make it more useful. Due to these changes any requirements such as "theme" , if I can do globally somewhere that would be great.

I have received a similar response as yours from CC Support. They pointed me to look at: HTMLTemplate (a global variable) and "tpl" object. Looking up this in the CCS Manual, I came across the SetVar method that might do the trick as and when I needed.

Going further, I just figured I can simply add a single LINE of code to my Template object's "LoadTemplate" method (as the last statement in the method) as below:

SetVar "@skin", "default"

This basically setting up the THEME to "default" theme. Of course, we are storing the user selected theme in the SESSION, so

SetVar "@skin", Session("skin")

That took care of the THEME every where with out ever having to touch or create the EVENTS. I guess if you are going to touch the code MANUALLY, like I do mostly, this would do the trick.

Thank you for your insight.

-Srinivas
View profile  Send private message

Add new topic Subscribe to topic   


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

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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