Jump to content

Recommended Posts

Posted

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!").

Posted
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;
});
  • Like 1
  • 1 month later...

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
×
×
  • Create New...