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

Using custom plugin output as channel entries param

Development and Programming

Clicked's avatar
Clicked
19 posts
14 years ago
Clicked's avatar Clicked

This question may be related to a resolved thread.

I have a module method which spits out a value, in this case a category id:

{exp:myModule:myMethod myParam="myValue"}

If I place this in my template it outputs the correct value, but if I try and use the output from this within a channel entries loop as a parameter it doesn’t work:

{exp:channel:entries channel="news" category="{exp:myModule:myMethod myParam="myValue"}"}

I assume this is a parse-order issue, but I would love to know if anyone has a solution that allows them to use output from a custom plugin/module as a channel entries param.

Any suggestions appreciated,

Moved to Development and Programming by Moderator

       
the3mus1can's avatar
the3mus1can
426 posts
14 years ago
the3mus1can's avatar the3mus1can

Try making you plugin work as a tag pair:

{exp:myModule:myMethod myParam="myValue"}
    {exp:channel:entries channel="news" category="{category}"} 
      ... other stuff...
    {/exp:channel:entries}
{/exp:myModule:myMethod}
       

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.