我有一个简单的插件,使用{exp:number}
输出一个数字。我如何在条件中使用它。喜欢
{if {exp:number} > 2} Greater then two {/if}
我无法让这个工作。
答案 0 :(得分:4)
我没有写过插件,但每当我看到它们被用作条件时,它们都用引号括起来:
{if "{exp:my_plugin:correct_answer question='{question}'}"}Congratulations!{/if}
我不确定你是如何将它应用于幅度比较的,但你可以在EE论坛中找到更多关于这个线程的帮助:
http://expressionengine.com/forums/viewthread/194654/#918764