Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

A simple question

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
lesmith
Smarty Rookie


Joined: 19 Sep 2003
Posts: 34

PostPosted: Thu Sep 25, 2003 11:12 pm    Post subject: A simple question Reply with quote

Hello Peeps

I am bit new to smarty and would like to ask a question on Config Files.

When usinf a config file ie test.conf

Does this replace CSS or can this do the Job of CSS

Plus does anyone know any good articles in using them to there full advantage.

Lee
Smarty Rocks
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Sep 25, 2003 11:24 pm    Post subject: Reply with quote

The short answer is no.

The longer answer is: generated HTML and CSS are interpreted by the client browser. The config file is used by the template itself--in other words, the client never recieves the config file, but instead it is an input to the generation process. ie. you can use config files to help you generate HTML and CSS (and JS, etc) files.

An advantadge to config files is that they are compiled and can be accessed/loaded by any template at template design time. In that way, they are useful for storing details that are common across the site or will be used by many templates and are not specific to a given user or request. It is also best for storing data that does not change often, though Smarty will automatically recompile for you when the config files change. As an example use, you can create color/style theme values that you then reference in your template. Other uses include storing paths, common strings, login information, etc. They can even be used to do quick 'n dirty string translation where you keep multiple config files, one for each language.

When, where and why to use them is very dependant on your application structure and personal preferences.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP