Jump to content

PageTable: hide pages in page tree


Robin S
 Share

Recommended Posts

I'm using a PageTable field for the first time.

I've set up the field so pages used in the PageTable field are stored under a separate "Tools" page. I want site editors to be able to view and edit PageTable pages via the PageTable field, but not see those pages in the page tree. Is that possible?

Link to comment
Share on other sites

You could put those items in a parent under /processwire/

Good solution, thanks!

Just curious: what is it about the /processwire/ branch that makes it hidden to non-superusers? Is it possible to create new branches that are hidden like this?

  • Like 1
Link to comment
Share on other sites

Wow! Another option! We discussed something similar here. But processwire is not in that systemIDs array. The search in all files from ProcessPageList module for "processwire" did not get me anywhere either. What is the source of that magic?

And just like Cerulean I would like to hide branches like that without hooks any modules. Though hooks and modules do exist.

  • Like 1
Link to comment
Share on other sites

But processwire is not in that systemIDs array.

I think it is in the systemIDs array: /processwire/ is the page titled "Admin", aka adminRootPageID

Thanks for the link to the other thread - that answers the question of how the /processwire/ branch is hidden.

Link to comment
Share on other sites

  • 1 year later...

Hello

I know this thread is not new, but I'm trying to achieve something similar.

I would like to have a certain template prefix for PageTables which then are not shown in the admin tree (never, not only for certain users/roles).

For a start, I have changed wire/modules/Process/ProcessPageList/ProcessPageListRenderJSON.php. (See diff in attachment).

To my surprise, this seems to do exactly what I need for templates starting with "pt_".

This is the first time I am doing some work on the "system" so be gentle please. ;-)

My question: How can I take this to a module (or??), so that it does not get deleted with upgrades?

 

ProcessPageListRenderJSON.diff

Link to comment
Share on other sites

@theo, the solution proposed in this thread involves creating a dedicated parent for all PageTable pages under the Admin branch of the page tree. Would this not solve your issue?

14 hours ago, theo said:

My question: How can I take this to a module (or??), so that it does not get deleted with upgrades?

You cannot modify the methods in ProcessPageListRenderJSON.php in a module or in any other way that means the changes will not be overwritten in a future update because the methods in this class are not hookable. Well, not apart from the construct() method anyway, which can't help what you are trying to do.

  • Like 1
Link to comment
Share on other sites

14 minutes ago, Robin S said:

@theo, the solution proposed in this thread involves creating a dedicated parent for all PageTable pages under the Admin branch of the page tree. Would this not solve your issue?

 

Thank you. How can I define where to store new PagesTables?

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...