Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Insert variable while calling a plugin

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
asmar
Smarty n00b


Joined: 26 Oct 2008
Posts: 4

PostPosted: Fri Feb 25, 2011 11:52 pm    Post subject: Insert variable while calling a plugin Reply with quote

Hello all,

I've got the following code just before my </head> in order to display the google analytics code.

Code:
{google_analytics code=My-Google-ID


The above code works great with the relevant plugin. What I want to ask is how to pass a variable instead of "My-Google-ID" as I have that variable in my database filled from the user.
How can I include that variable into this piece of code?

Thanks
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Sat Feb 26, 2011 11:16 am    Post subject: Reply with quote

Assign in your script a Smarty variable with the ID and use that in the template.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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