Wednesday, October 20, 2010

Modx 2 snippet bummer

If you code [[*value]] in snippet php coding, you will realise the value gets populated when you return it.
But, if you are using the value in [[*value]] to check some condition, then you are out of luck.
The real value isnt populated during the script process.
Its only populated after its been processed.

Alternative way is to pass in value to snippet:
[[!mysnippet? &myvalue=`[[*value]]`]


No comments: