Jump to content

$page->children("check_access=0") not working


J_Szwarga
 Share

Recommended Posts

I have a template setup with restricted access. I have the following option set on the Access tab:

image.png.0934011b37a09fbff20938a999f289c7.png

 

Before, I had this set to "Yes", and the page using this template was showing up in my main menu. I need to keep this page visible in the main menu for all users and visitors.

But I need to set security on this page so that all of the children pages (which are based on many different templates) can inherit the security setting and NOT show up in searches/lists.

 

So I changed this template to "NO", don't show up in lists. Now the page is not showing in the main menu (expected). So I thought, "no problem, I'll just tweak the selector used for my main menu items."

 

$homepage = $pages->get("/");
$menuItems = $homepage->children("check_access=0");

So I simply add "check_access=0" to the children() method, so I should get ALL published pages, regardless of security.

But...I still do not get the page using my secured template, unless I'm logged in with permissions to view the page.

I try different selectors in that $homepage->children() call, and they work. Why is check_access=0 getting ignored?

Link to comment
Share on other sites

Of course I didn't see this until right after posting...

Since I'm using MarkupSimpleNavigation module, the $menuItems that I'm passing to it are just for the root menu items...the MarkupSimpleNavigation module does the heavy lifting for getting the child items to build out the menus. The secure page that I'm trying to show is one of those child menu items. So this is not a problem with the selector...this is something that I need to sort out with MarkupSimpleNavigation. 

I'll rephrase this question in the MarkupSimpleNavigation support forum...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...