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

call a plugin from another plugin?

 
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
ikarius
Smarty Rookie


Joined: 05 Jan 2004
Posts: 6

PostPosted: Wed Jan 07, 2004 6:47 pm    Post subject: call a plugin from another plugin? Reply with quote

Hello,
I'm using smarty plugin functions to generate some elements which are common on my HTML pages. I'm interested in actually calling one plugin from another plugin, either to deal with generating a list of similiar elements, or to simply include a smaller sub-element in something larger. The primary motivation for this is that my snippets of HTML are only in one place, and I dont end up with HTML code I might have to modify in 2 places.

1. Would this be a complete and utter abortion against nature, and result in poor performance of compiled templates?

2. Can I do this, and if so, what am I going to need to call? I know that smarty evals my plugin code, but I'm not sure where the functions I define end up (do they end up as methods of my smarty class, do they end up as items in an associative array smarty keeps, etc.

Thanks
--Ikarius
Back to top
View user's profile Send private message
ikarius
Smarty Rookie


Joined: 05 Jan 2004
Posts: 6

PostPosted: Fri Jan 09, 2004 6:09 pm    Post subject: Reply with quote

No takers on answering this?

--Ikarius
Back to top
View user's profile Send private message
messju
Administrator


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

PostPosted: Sat Jan 10, 2004 7:23 am    Post subject: Reply with quote

ikarius wrote:
No takers on answering this?

--Ikarius


for 2. see http://smarty.php.net/manual/en/plugins.writing.php . the first place one would look when implementing plugnis anyway.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ikarius
Smarty Rookie


Joined: 05 Jan 2004
Posts: 6

PostPosted: Tue Jan 13, 2004 11:27 pm    Post subject: Reply with quote

Ok, got it. I took a look at the code inside your plugins to get it to work. Thanks!

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