Hi,
I need to hide part of the template when the query string (GET) variable is present. I've tried <?php if (isset($_GET['ok'])) { ?> OK <?php } ?>, tried google for "hide by get parameter modx", etc but nothing found. How to do that?
Kind Regards,
Alex
https://modx.com/extras/package/geturlparam
//www.example.com?myString=awesome
[[!getUrlParam:is=`awesome`:then=`
<link rel="stylesheet" type="text/css" media="screen" href="[[++assets_url]]myString.css">
<link rel="stylesheet" type="text/css" media="screen" href="[[++assets_url]]myString123.css">
`?
&name=`myString`
]]
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
or fastfield-tags (included with pdoTools)
load the chunk 'yourChunk' if the url-param ok = 1:
[[[[!#get.ok:is=`1`:then=`$yourChunk`]]]]
Quote from: Bruno17 at Mar 07, 2017, 01:37 AMor fastfield-tags (included with pdoTools)
load the chunk 'yourChunk' if the url-param ok = 1:
[[[[!#get.ok:is=`1`:then=`$yourChunk`]]]]
Thanks Bruno,
I am a fan of pdoTools and this one is new to me

Still learning!
Codeplaza Webdesign: for professional websites at low cost