We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How to get existing template variables in custom module

Development and Programming

Adrian Macneil (Crescendo)'s avatar
Adrian Macneil (Crescendo)
28 posts
15 years ago
Adrian Macneil (Crescendo)'s avatar Adrian Macneil (Crescendo)

So assuming I have some code like this in my template

{exp:channel:entries channel="mychannel"}
<h2>{entry_id}: {title}</h2>
{exp:my_custom_tag:function}
{/exp:channel:entries}

Is it possible to get variables from the parent entries tag (such as entry_id), without explicitly passing them into my_custom_tag? (I already know about $this->ee->TMPL->fetch_param(), but that doesn’t seem to be able to fetch inherited parameters, such as in this case, the entry_id)

Thanks!

       
Adrian Macneil (Crescendo)'s avatar
Adrian Macneil (Crescendo)
28 posts
15 years ago
Adrian Macneil (Crescendo)'s avatar Adrian Macneil (Crescendo)

Bump.. does ellislab have developers prowling these forums, or are we on our own?

       
Greg Aker's avatar
Greg Aker
6,022 posts
15 years ago
Greg Aker's avatar Greg Aker

You’re best served passing it in.

-greg

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.