Answer the question
In order to leave comments, you need to log in
MODX Revo. Is it possible to dynamically pass parameters to a snippet?
I'm using getResources to display the news feed. There are two buttons for sorting: by date, by rating. I will focus on "sorting by date" and the sortBy parameter with possible values of DESC and ASC, which need to be dynamically replaced depending on the visitor's actions.
Please tell me an elegant way to solve this problem.
PS I apologize for the large number of given tags. It's just that they'll all be needed to solve this quest.
Answer the question
In order to leave comments, you need to log in
Alternatively, add a get parameter to the url that appears depending on the user's actions, and in sortBy call a snippet that will process these get parameters, and output DESC or ASC depending on the parameters.
There are also tvFilters for getResources, look that way.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question