hi every1 !!!
ill keep it short and simple:
ive got a list of media, sorted by a specific tag (lets say: fun).
when i select something from this list, it sends me to an other page
where a snippet is called up to display the media.
thing is, the snippet needs a variable to be set with the name of the
media that should be displayed.
question:
how can i send the name (variable) of the media file, from the list
to the other page, to then implement in the snippet call.
and here is something similar to the top part:-
when i select a tag (im making a custom tag’s snippet, as the otherone does not meet my requirements),
the snippet that is called uppon that needs to know which tag was selected.
how can i do this?
thank you in advanced!
-
MODX Staff
- 10,725 Posts
Add them to the query string of the links (or as form elements for a submit action), and use PHP $_GET or $_POST to retrieve query string parameters from the request, just as you would with any PHP code.
ok makes sence.
so now i call a page like that, then on that page i have a snippet call
and then i do a GET iside the snippet?
and when i want to send a variable through the snippet call - like type=fish
which is the easiest way to do this?
sorta wont work with GET