I got a very simple problem:
I have page which is visible to the public (login page) but I want it hidden when a user is logged in.
More details:
I use a normal auto-generated menu and the ’login’ entry is visible to the public and the menu. But when people are logged in I don’t want to change the name (I know how that works) but want the entry to be removed entirally.
So a logged in user NOT seeing a page that a public user (not logged in) CAN see.
Alternately, I’m looking for this because on my ISS server it seems that protected pages aren’t redirected but just pop up a .htaccess like "username/password" box. So I’m cheating by renaming the login page to be the same as the normal one (resources) and having the normal one visible only to logged in users. The plan was that the normal Resources page isn’t in the menu but the login page (named Resources) in it’s place. So people click on it, log in and hey presto! The resources page appears in it’s stead.
-
MODX Staff
- 12,272 Posts
Two options: use MemberCheck or PHx
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
MemberCheck, how do you mean?
PHX? What is it?
MemberCheck and PhX are two snippets available in the "Resources".
Cheers,
Taff
Adrian Lawley: www.adrianlawley.com
Just to add, I’ve also looked into the snippet code itself. It does a ’modx->getChunk($name)’ but no parsing. I’ve looked into the MODx documentation but failed to find a ’parse’ function.
-
MODX Staff
- 10,725 Posts
Parsing of tags in the content processed by MODx is done automatically. If it’s not being processed, something is interfering with the parsing on that page. Could be any number of things, but PHx could be a possible source of the issue, as could nesting the tags too deep (you can adjust the max parser passes in your index.php) or within cacheable tags on a cacheable page.