|
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 |
gencer Smarty Rookie
Joined: 03 Dec 2011 Posts: 5
|
Posted: Mon Jan 30, 2012 12:50 pm Post subject: Smarty3 filename issue |
|
|
Hi,
In Smarty 3 (and maybe this happens in v2 too) if i give same filename to different files in different folders, caches are mixed!
For example. Lets say we have 2 views. This to wives are folder1 and folder2. Both folders have index.tpl. So, it just crashes.
How do i prevent it? For quick resolve i just renamed files as index1 and index2...
Thanks,
Gencer. |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Mon Jan 30, 2012 2:02 pm Post subject: |
|
|
What's the value of your $template_dir for the files to crash? _________________ Twitter |
|
Back to top |
|
gencer Smarty Rookie
Joined: 03 Dec 2011 Posts: 5
|
Posted: Mon Jan 30, 2012 2:41 pm Post subject: |
|
|
rodneyrehm wrote: | What's the value of your $template_dir for the files to crash? |
It depends on which page is called. If index.php called $template_dir is "./folder1", if login.php called its "./folder2". I'm using modular application model for my project. Each application has its own folder and view. But they are using the same cache folder. "./cache/tpl"
Also, if im c orrect a while ago i tested something that, i include a file in tpl files which is in another folder but same filename. (like /view1/index.tpl includes /view2/index.tpl). Smarty caches are mixed...
I will test right now and let you know.
UPDATE:
Ok. I slightly upgraded to Smarty v3.1.7 and it seems that this issue resolved. Sorry for the false alarm.
Gencer. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Mon Jan 30, 2012 3:27 pm Post subject: |
|
|
otherwise you would need to set a unique compile_id for each template folder for older versions. |
|
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
|