Is there something special I should do to Wayfinder so that it stops showing hidden pages AFTER a user has logged out? Hidden menu does NOT show BEFORE the user logs in. That's good. It DOES show AFTER the user has logged in. But after the user logs out, the menu item continues to show. Clicking on it does not display the hidden page (it defaults to the home page), but it's annoying that this menu item continues to show after logout.
Using Revo 2.0.8-pl, wayfinder version 2.3.3.
Thanks,
Dan
Nevermind. I think I figured it out. Wayfinder was caching results, so menu items that did show up when the user was logged in continued to show up after the user logged out. Made a simple replacement:
FROM [[Wayfinder? ....
TO [[!Wayfinder? ....
-Dan
I'm not positive that this will work, but I think you might be able to speed things up by putting the uncached Wayfinder tag (and nothing else) in two separate chunks called "LoggedIn" and "NotLoggedIn" and using a snippet to display the appropriate chunk:
<?php
/*ShowMenu snippet */
$chunk = $modx->user->hasSessionContext($modx->context->get('key')) ? 'LoggedIn' : 'NotLoggedIn';
return $modx->getChunk($chunk);
That way, the two menus would be cached and Wayfinder wouldn't have to recreate them on every page visit.
---------------------------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
MODx info for everyone:
http://bobsguides.com/MODx.html
Thanks for buying the book.
---------------------------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
MODx info for everyone:
http://bobsguides.com/MODx.html