|
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 |
pt2002 Smarty Regular
Joined: 05 May 2003 Posts: 89 Location: Porto, Portugal
|
Posted: Mon Oct 06, 2003 10:32 pm Post subject: Cache files and compiled templates |
|
|
Hello
I have a simple site that is made with some templates:
header.tpl, menu.tpl, content.tpl and footer.tpl.
These templates are included by another template: index.tpl
For each template, Smarty creates a file in templates_c dir and only one cache file (caching=true).
Is there any way to "merge" these templates in only one file ? This way, Smarty would create only one compiled template instead of five files.
In my case, header has always the same content and the only file that changes often is content.tpl that grabs data from a database.
Thank you very much. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Tue Oct 07, 2003 6:47 am Post subject: |
|
|
why do you care how smarty handles it's compiled-templates internally?
what makes you think that creating 1 file would be better?
if you want only one file to be created you have to use only one source-file. copy the contents of your included templates (header.tpl) etc. literally in your index.tpl so you end up in only one (source-)template. using something like smarty may become pretty useless then, though. |
|
Back to top |
|
pt2002 Smarty Regular
Joined: 05 May 2003 Posts: 89 Location: Porto, Portugal
|
Posted: Tue Oct 07, 2003 8:48 am Post subject: |
|
|
I was just trying to know if it was possible to reduce the number of files written to the disk, keeping the same structure (several template files).
Thank you very much for your answer. |
|
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
|