Jump to content

Recommended Posts

Posted

Hi,

We have a client who insists on a one level url structure. They are used to it from other CMS.

Example:

  • Home
    • menu 1
      • page 1

This results in the url

  • /menu-1/page-1/

The client wants a custom url:

  • /page-1/

I did unsuccessfully search the modules for a solution. I am currently a bit at a loss on how to achieve this without creating redirects manually through the redirect module or .htaccess. Has anybody already approached this case?

Any input is appreciated.

Adrian

  • Sad 1
Posted (edited)

Hello Adrian,

Can this help you?:

And had you seen this module (in beta version)?: https://processwire.com/modules/custom-paths/

And there is this for the admin/backend if neededhttps://processwire.com/blog/posts/page-list-custom-children-module/

Edited by Christophe
Posted

Off the top of my head, if you require all pages to utilize the unique status, ProcessWire can take care of this for you. You don't ever need to know the path, only the $page->name property, when creating links to pages. That will retain what your client seemingly wants. It may cause issues elsewhere though, if you actually need depth (potentially with URL hooks), or certain modules.

I base my response from this short topic: 

 

Posted

Thanks to both of you. I did not see the custom paths module. This may work indeed, I will test it, as this is fortunately not a multi-lingual site.

And yes, the name property is an option, I could rewrite the navigation module. But knowing the client, I am sure he will want exception for this flat url approach.

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