Pinkie
Pinkie

Reputation: 10256

expressionengine conditional

I have a simple plugin that outputs a number using {exp:number}. How can I use this in a conditional. like

{if {exp:number} > 2} Greater then two {/if}

I can't get this to work.

Upvotes: 0

Views: 373

Answers (1)

Mike3d0g
Mike3d0g

Reputation: 277

I haven't written a plugin but whenever I've seen them used as a conditional they are enclosed in quotation marks:

{if "{exp:my_plugin:correct_answer question='{question}'}"}Congratulations!{/if}

I'm not sure how you apply this to magnitude comparisons, but you might find more help on this thread in the EE forums:

http://expressionengine.com/forums/viewthread/194654/#918764

Upvotes: 4

Related Questions