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

use {function} brought in by {include}

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


Joined: 10 Jan 2011
Posts: 96

PostPosted: Sat Jun 14, 2014 10:57 am    Post subject: use {function} brought in by {include} Reply with quote

Hi
I would like to use a {function name="feedback"} accessed by the main files, in an {include}d header file, but it seems I cannot use it (Error: "{feedback}" unknown tag "feedback"). Even scoping does not help.
Is that the intended behaviour, since issued to the inheritance compile time process, or is there a way to make this work?
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sat Jun 14, 2014 11:50 am    Post subject: Reply with quote

See http://www.smarty.net/docs/en/language.function.function.tpl
See http://www.smarty.net/docs/en/language.function.call.tpl

Template functions defined external from the current template must be called with {call.....}
Back to top
View user's profile Send private message
Aristophan
Smarty Regular


Joined: 10 Jan 2011
Posts: 96

PostPosted: Sat Jun 14, 2014 12:40 pm    Post subject: Reply with quote

Wunderbar! I missed reading about {call}
Thanks.
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