aComAdi Posted 21 hours ago Posted 21 hours ago 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 1
Christophe Posted 17 hours ago Posted 17 hours ago (edited) Hello Adrian, Can this help you?: New URL hooks -> https://processwire.com/blog/posts/pw-3.0.173/ URL segments -> https://processwire.com/docs/front-end/how-to-use-url-segments/ And there have been quite some updates related to URL segments -> via Google you can search site:processwire.com/blog/ URL segments And had you seen this module (in beta version)?: https://processwire.com/modules/custom-paths/ And there is this for the admin/backend if needed: https://processwire.com/blog/posts/page-list-custom-children-module/ Edited 17 hours ago by Christophe
BrendonKoz Posted 17 hours ago Posted 17 hours ago 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:
aComAdi Posted 5 hours ago Author Posted 5 hours ago 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.
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