SwimToWin Posted January 17, 2021 Share Posted January 17, 2021 I love nice urls - but I also recognize that they are not always needed nor desired due to the additional steps in page creation. Suggested solution: Page ID Page ID is a per-template auto-incrementing number. No. series might be added on a per-template basis (to be configured by webmaster). Page url Replace the full page url with an ID (as an optional configuration). Page url might then change to something like: www.example.com/page/1234 Editing (Page Tree is much less important in this scenario.) Like Drupal's Node IDs (nid). Why this change? Name may reveal confidential info. Name may not matter on certain templates. Page creation is no longer a two-step process; much like adding a row in MySQL. Benefit: This change will make it easier to use ProcessWire for other purposes than websites ("Oh - so ProcessWire is also a finance system!"). Link to comment Share on other sites More sharing options...
bernhard Posted January 17, 2021 Share Posted January 17, 2021 8 hours ago, SwimToWin said: Page url Replace the full page url with an ID (as an optional configuration). Page url might then change to something like: www.example.com/page/1234 At least this part can be done with a simple hook ? // site/ready.php $wire->addHookAfter("Pages::saved(template=foo)", function($event) { $page = $event->arguments(0); $page->name = $page->id; }); 1 Link to comment Share on other sites More sharing options...
markus_blue_tomato Posted February 22, 2021 Share Posted February 22, 2021 @SwimToWin I've build something for that: https://github.com/blue-tomato/PageUseIdAsName Link to comment Share on other sites More sharing options...
adrian Posted February 23, 2021 Share Posted February 23, 2021 Or another approach if you don't want to actually change the name: https://processwire.com/modules/process-redirect-ids/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now