Jump to content

keeping a page in a fixed position (last) in the sorting order


Joe
 Share

Recommended Posts

Hi everyone!

For a PW-based website I´m doing for someone I have created a "site settings page", a page where the website admin (guest role) can change the site title, meta description tag and page footer for all pages. The page is not made visible on the website (no template file).

Now to keep things simple and logical for the client I would like to keep this "page" always in the last position in the "Pages"-view. How can I assure it stays there as new pages are created and can I block the "page" from being moved about by drag and drop?

I feel an even better option would be to keep this site settings page from being visible at all in the "Pages"-view for the guest role but make it accessible via a link. Is that possible?

Or is there maybe another way I have not thought about to allow users to set basic features common to all pages?

Thanks for your help! :)

Joe

Link to comment
Share on other sites

;) An answer to my own post:

I have found one possible solution for now: I manually set the value in the database for sort for the site settings page in the "pages" table to a very high value. That seems to do the trick of keeping the page at the end of the list as new pages are created. But of course this does not protect the page from being moved by drag´n drop.

Link to comment
Share on other sites

Joe, I just updated the Admin Custom Pages module to especially allow creating a "settings" kind of page on a tab of the admin http://processwire.com/talk/topic/3474-admin-custom-pages-module/?p=45361

Maybe that would also fit your needs.

Thank you diogo!

Yes with this I arrived at the perfect solution!

I actually placed the site settings template under the setup tab now, where it is accessible to the guest role user together with the function to restore pages from the recycle bin (Trashman module), which also resides there. That way things appear more logical to the user, as the site settings options are not any longer presented as a "page". Great! :)

SiNNut: Thank you too! Since diogo´s solution is working so well I am not looking into this more closely now. But I think that would work too. However I´m not aware of how to add a custom tab to a template, if you could point me in the right direction that might be usefull for future use.

  • Like 1
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...