ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Plugins in parameters

September 20, 2010 1:32pm

Subscribe [2]
  • #1 / Sep 20, 2010 1:32pm

    airways

    154 posts

    We’re working on a system that uses a custom written plugin to power quizes, and would like to do something like this to get a certain record from the result_text channel:

    {exp:channel:entries channel="result_text" search:result_summary_age="{exp:quiz:get_age}"}
    ...
    {/exp:channel:entries}

    I seem to remember this sort of thing working fine in 1.6, however now we are always getting a search for the literal text of the parameter including the plugin tag.

    Is there any way to get this sort of thing to work the way we think it should / did?

  • #2 / Sep 20, 2010 1:43pm

    hd 

    156 posts

    It’s a parsing order issue since the “Channel” module is running before the “quiz” plugin, the most efficient way to handle this (imo) is to nest an embedded template.

    You could try:

    {embed="_includes/.your_results" get_age="{exp:quiz:get_age}"}

    _includes/.your_results:

    {exp:channel:entries channel="result_text" search:result_summary_age="{embed:get_age}"}
    ...
    {/exp:channel:entries}

    Now, the “quiz” plugin should be rendered, then the embed, and inside the embed the Channel module.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases