EllisLab text mark
Advanced Search
     
Passing tags into add-on
Posted: 16 August 2012 07:27 AM   [ Ignore ]
Avatar
Joined: 2010-10-11
93 posts

Hi!

I’m having some trouble passing some data from a tag into my plugin/module add-on.

Basically, I’m trying to do something like this:

{exp:imgaddon:size src="{cat_image}" size="400"

Echoing the paramater through

$this->EE->TMPL->fetch_param('src'); 

returns the string “{cat_image}” instead of what the tag contains when outputted in the template.

How can I get that value?

 Signature 

MM Password Protection - Simple Page Password Protection for MojoMotor powered websites

 
Posted: 16 August 2012 11:22 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2011-08-09
33 posts

You could add parse=“inward” to the tag that surrounds your plugin. That will parse the outer tag before the inner one then. If that doesn’t work can you post the code that includes the outer tag?

 Signature 

Patrick Woodcock, Web Developer at Ralph Media.

 
Posted: 17 August 2012 02:52 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2010-10-11
93 posts
Patrick64 - 16 August 2012 11:22 AM

You could add parse=“inward” to the tag that surrounds your plugin. That will parse the outer tag before the inner one then.

That worked like a charm - I thought I already tried it, but I must have done something wrong then.

Thank you.

 Signature 

MM Password Protection - Simple Page Password Protection for MojoMotor powered websites