I am trying to create an album selector for my Gallery snippet, i.e. a link to show album 1 or album 2 on the same page. I am doing this with a $_GET variable and a snippet that reads the $_GET array into placeholders, modx.request.something - in this case, the one I want is modx.request.type. I then feed this placeholder into the gallery call like so:
[[!Gallery?
&album=`[[!+modx.request.type]]`
]]
So now, if 1 is selected, album 1 will display, and likewise with 2. What I am trying to do is deal with the situation where nothing is selected in the $_GET array. When that happens, I want the placeholder to default to 1 so that album 1 is displayed. I have a feeling there should be an easy way to do this with output filters, but I can’t think what it might be.
Any help would be greatly appreciated.