|
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 |
DB_UK Smarty n00b
Joined: 29 Mar 2011 Posts: 1
|
Posted: Tue Mar 29, 2011 9:08 pm Post subject: include - testing if template exists |
|
|
I'm just migrating from Smarty 2 to Smarty 3.
An existing Smarty 2 template (1) is ignoring an include for a template (2) that doesn't exist, continuing to display the rest of template 1. Running this with Smarty 3 none of the template 1 is displayed.
If Smarty 3 does not allow missing includes, is there a way to test within a template if another template exists?
I'd be grateful for any advice.
Thanks in advance. |
|
Back to top |
|
fulopattila122 Smarty n00b
Joined: 31 Jan 2013 Posts: 2
|
Posted: Thu Jan 31, 2013 5:10 pm Post subject: Re: include - testing if template exists |
|
|
DB_UK wrote: |
If Smarty 3 does not allow missing includes, is there a way to test within a template if another template exists?
|
AFAIK it's only possible with plugins. Good news is there is one: Include If Exists compiler plugin for Smarty v3 |
|
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
|