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

include - testing if template exists

 
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 -> Smarty 3
View previous topic :: View next topic  
Author Message
DB_UK
Smarty n00b


Joined: 29 Mar 2011
Posts: 1

PostPosted: Tue Mar 29, 2011 9:08 pm    Post subject: include - testing if template exists Reply with quote

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
View user's profile Send private message
fulopattila122
Smarty n00b


Joined: 31 Jan 2013
Posts: 2

PostPosted: Thu Jan 31, 2013 5:10 pm    Post subject: Re: include - testing if template exists Reply with quote

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