Show memberpage when signed in only
PermalinkI have hidden the members page from navigation.
But I would like the members page to be visible for people that are signed in.
How can I do this?
I tried to understand the autonav php files but i give up!
I don't want it at all unless you are signed in.
Now you see it but can´t access it.
This needs to be unchecked.
Cache cleared manually in C5 and also in browser.
Looked at the page in another browser and members was still there....
To be clear. Its the LINK in the main menu we are talking about, not the page itself.
If you find a sollution please post it.
I guess we could do a new autonav template and then change autonav when people are logged in.
I had a look at the displayPage function of controller.php for the autonav and it appears that it doesn't check permissions for the page.
You should be able to copy /concrete/blocks/autonav/controller.php to /blocks/autonav/controller.php and edit the displayPage function, replacing it with this:
protected function displayPage($tc) { $tcp = new Permissions($tc); if ($tc->isSystemPage() && (!$this->displaySystemPages)) { if ($tc->getCollectionPath() == '/members' && Config::get('ENABLE_USER_PROFILES') && $tcp->canRead()) { return true; } return false; } $tcv = $tc->getVersionObject(); if ((!is_object($tcv)) || (!$tcv->isApproved() && !$this->displayUnapproved)) { return false; } if ($this->displayUnavailablePages == false) { if (!$tcp->canRead() && ($tc->getCollectionPointerExternalLink() == null)) { return false;
I'm assuming you're using 5.5.x here. It's probably very similar in 5.4.x though.
If so, I think I'd probably submit this as a bug fix.
(and undo your hiding of the page)