Forum
Perch Navigation - Ancestor
I'm displaying navigation based on a navgroup. I'm only displaying navigation one level deep, so I've only added the top level pages to the navgroup. The client will be able to add subpages.
I'd like to be able to highlight the page on the navigation whenever I'm on a child page of that page, but the ancestor class isn't added unless the child page is in the navgroup too, and a child of it within the navgroup.
Is there a way to check if the page if the page is an ancestor of the current page within the MAIN site structure, rather than within the particular navgroup I'm displaying?
(Took me a while to work out why it wasn't displaying the ancestor class as I expected).
I can add the child pages to the right navgroup as it stands, but I can't really expect the client to remember to do that when they create a page.
Alternatively, is there a way to tell Perch Runway to add any child pages to the same navgroup (as children of the same page they are in the main tree).
Secondly, if I want to restrict some pages from being updated/seen by the client I see I can "Restrict access to members with tags". Is this on the admin side, or just on the front end? If so, how do I add a tag to a user. Are users and members different.
Thanks :)
It sounds like maybe you don't really want a navgroup. What's the reasoning behind using that approach?
That's for restricting pages in your site for Members, nothing to do with control panel access. For the latter, you would use the permissions on regions and collections. You can choose to hide items that the user doesn't have permission to edit on the Settings page.
Thanks, Drew - I just wanted to be able to show menu items in different places - I have pages that I show in the footer, pages I show in the main Nav, and pages I show in the "Top Nav". I realise I could not use a navgroup, and that might potentially be a route for me, but would I then have to hide everything that appears in my footer nav and main navigation?
That is an option for me, and I may have to go that route. That will work on this occasion, but I can still see a use for being able to check if a page is an ancestor of the current page in the main page tree (that's what I assumed it was doing).
Re control panel access, is there a way to restrict per page, or just per region? - some of the pages don't have any regions - they're the Post detail page, or the RSS feed page in Runway. I'd just find it helpful to be able to hide some of these so that they don't confuse the client.
You can't hide a page at the moment - simply because it throws up UI nightmares of what do to when a page in the middle of a tree becomes hidden. The user may have access to pages below, but we'd not be able to display them.