Quote from: Fritz at Mar 02, 2009, 03:00 PM
Any ideas on this?
it’s very strange how it works if I ’hard code’ the number directly in, but if I try to pass it via the TV it bombs out.... is there a trick to template variables and snippets?
Yes, unfortunately the 0.9.x releases have a very precise parsing order for different tags where all tags of a single type, i.e. [[]], [**], {{}}, [++], etc., are evaluated all at once in each pass. See
this wiki article for more information on the current parser execution order.
To get around this, you can call the snippet using the non-cacheable tags, i.e. [! !], which will delay the parsing of the snippet until after the content tags, i.e. [* *], have been processed.
In the upcoming MODx 2.0 release, which we call Revolution, there is a more natural, source-order parsing algorithm that will allow nested tags to be evaluated as part of the evaluation of the tag it is nested in.