Answer the question
In order to leave comments, you need to log in
How to pass a parameter to a snippet?
Hello. MODX R 2.7.3-pl.
There is a file for generating a product catalog in xml format. On the 27th line, I want to call the getExternalCode snippet and pass the $sync_data variable to this snippet.
How to do it?
If you write simply , then a string (json) is displayed - everything is ok. But I need to pass this variable to the snippet so that it parses the line and returns the data I need.
Please tell me the solution, I'm not well versed in MODX. Already went to 3-4 pages of search results, it still didn’t work.
Thanks :) externalCode="$sync_data"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question