ExpressionEngine templates: pass a plugin/module's output as parameter to another plugin/module -
here's want accomplish:
{exp:plugin1:method arg="{exp:plugin2:method}"}
i’ve tried number of different approaches.
approach 1:
{exp:plugin1:method arg="{exp:plugin2:method}"}
result: plugin1->method
’s arg
parameter value string, {exp:plugin2:method}
, , it’s never parsed.
approach 2:
my understanding of parsing order suggests might have different results, apparently not.
{preload_replace:replaced="{exp:plugin2:method}"} {exp:plugin1:method arg="{replaced}"}
result: arg
parameter has same value approach 1.
approach 3:
first define snippet (snip
), content is:
{exp:plugin2:method}
then in template:
{exp:plugin1:method arg="{snip}"}
result: same approaches 1 , 2.
approach 4:
noting plugins processed in order appear, have tested placing instance of {exp:plugin2:method}
before {exp:plugin1:method}
call. thinking wrap first call in regex replacement plugin in order suppress output, trigger plugin2’s parsing first.
{exp:plugin2:method} {exp:plugin1:method arg="{exp:plugin2:method}"}
result: plugin1->method
’s arg
parameter value temporary hash placeholder plugin2->method
’s output (md5 believe) template class reserves until later.
interesting approach. however, can achieved more this:
{exp:plugin1:method arg="{exp:plugin2:method}" parse="inward"}
Comments
Post a Comment