Is it possible to use tag pairs as parameters?

Take the code below


Normally, using parameters, you are going to do this

$qux    = ee()->TMPL->fetch_param('qux');

Inside the plugin, is there something I can call to get the values between the tag pairs just like the code above?

My motivation for doing this is because using "parameters" for plugins usually result in a parse order issue for me.Some people seem to have the same problem too.


I aiming to use the parameters to do some processing and return a single string for the plugin.


1 Answer 1


you'll have to fetch / process them from tagdata yourself.
$this->EE->TMPL->var_pair will have an array of var-pairs you can walk.
Then compare / preg_match() them on the keys/tags you're looking for.

You can see by looking at an example in a small calendar class i made:
Calender_entries (github, highlighted)

  • Nice! I could peruse the regular expression to parse what is inside the tags. Dec 29, 2013 at 23:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.