Not showing the menu item in menu bar

Permalink
Hi,
I have the new page and give the certain permission that only loged user are seen the page.
All is going well,
what when i logged out with my account, then i am no able to see the page title in the menu bar.
I want that when some one click on the that page and they are not logged in, so then first they ask for login.
thanks in advance

phpsoftsol
 
Mainio replied on at Permalink Reply
Mainio
Quick fix:

Add something like this first thing in your template:
global $c;
if ($c->getCollectionPath() == '/path/to/your/special/page') {
   $nav = Loader::helper('navigation');
   $login = Page::getByPath('/login');
   header("Location: " . $nav->getLinkToCollection($login));
   exit;
}


Antti / Mainio
joseajohnson replied on at Permalink Reply
joseajohnson
Not sure if this is what you're looking for, assuming you want to keep permissions on a page limited to registered users while still having it appear in the menu bar at the head (autonav block).

While in edit mode, left-click the autonav menu bar, and click edit.
The second item in the 'edit' tab should read:
Viewing Permissions
Display pages to users even when those users cannot access those pages.

Make sure this box is checked.

Follow this procedure on those publicly accessible pages on which you wish the link to the page in question to appear.

Alternatively, from the Dashboard, click 'Pages and Themes,' then 'Page Types' tab, and from the list, select the 'Defaults' button of the predominant page type (Left Sidebar, Blog Entry, etc.) used to display those pages on which you wish the link to appear.

Follow the same procedure, and after updating the autonav block, again left-click the same, but this time select 'Setup on Child Pages' instead of 'edit.'

You can select all pages currently using the currently selected page type, or choose only those relevant to the public.

Hope this helps!