Jump to content

how to make page searchable but still exclude from list ?


Recommended Posts

Posted

I have a page root which will not be shown on navigation menu (auto-generated)

Page settings provide this option to hide from lists. but it both hide from search

post-2272-0-92379700-1450944452_thumb.pn

How could I make hidden page still searchable ?

Posted (edited)

include=hidden in your search selector
 
http://processwire.com/api/selectors/#access_control


// results exclude hidden, unpublished or non-viewable pages
$pages->find("template=skyscraper");

// results may include hidden pages
$pages->find("template=skyscraper, include=hidden");

// results have no exclusions
$pages->find("template=skyscraper, include=all");

// results may include pages user can't view
$pages->find("template=skyscraper, check_access=0");

Edit: But why not just exclude your page from the menu using the API?

Edited by kongondo
  • Like 4

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
  • Recently Browsing   0 members

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