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

Cache files and compiled templates

 
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
pt2002
Smarty Regular


Joined: 05 May 2003
Posts: 89
Location: Porto, Portugal

PostPosted: Mon Oct 06, 2003 10:32 pm    Post subject: Cache files and compiled templates Reply with quote

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
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Tue Oct 07, 2003 6:47 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
pt2002
Smarty Regular


Joined: 05 May 2003
Posts: 89
Location: Porto, Portugal

PostPosted: Tue Oct 07, 2003 8:48 am    Post subject: Reply with quote

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
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