|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
lesmith Smarty Rookie
Joined: 19 Sep 2003 Posts: 34
|
Posted: Thu Sep 25, 2003 11:12 pm Post subject: A simple question |
|
|
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 |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu Sep 25, 2003 11:24 pm Post subject: |
|
|
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 |
|
|
|
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
|