-
MODX Staff
- 1,535 Posts
Question marks and ampersands have special meanings to the document parser when parsing a snippet call in Evo - what is likely happening is that the parser is choking on that URL because it contains the special characters it expects to define the structure of the snippet call.
If the TV is attached to the page, why not just pass in the TV name rather than the value and then grab the value from the $modx->documentObject array within the snippet. That will avoid the issue.
Or, if you are manually entering the URL into the snippet call - you will need to have some kind of substitution for those characters, e.g.: |eq| for ’=’, |amp| for ’&’, |bt| for ’`’
Then, in the CreateLink snippet do a str_replace() for each of those to put them back to what they need to be.
Garry Nutting
Senior Developer
MODX, LLC
Email:
[email protected]
Twitter: @garryn
Web: modx.com
-
MODX Staff
- 10,725 Posts
Unfortunately, MODx Evolution (0.9.x/1.x) does not support the characters ?, &, or = in the tag strings. This is why it is failing. You would be better off just passing the name of the TV, then get the value of that TV inside your snippet.
FWIW, this is not/will not be an issue in the MODx Revolution releases.
omg!!!
The more I learn about modx...the more amazing it is!
I didnt know you can access the TV as well!
As always, big thank you!