SamC Posted May 21, 2017 Share Posted May 21, 2017 Been away for a while skilling up on css animations and svg. Anyway, I'm back in the PW game and my momentum has halted after time away! Just wondering how to make the following work: So we have mysite.com/misc-pages/privacy-policy/ How do I make this page have a URL like this: mysite.com/privacy-policy/ ...without having to move this page to the top level? Looked at urlsegments but this would only affect anything after i.e. mysite.com/misc-pages/* It's a menu in the footer which I can create easy enough with children of misc-pages, however, I'm not too keen on the URL in this situation. Or is it just a case of renaming 'misc-pages' to something else and getting on with life? Any advice is appreciated. Thanks. Link to comment Share on other sites More sharing options...
Zeka Posted May 21, 2017 Share Posted May 21, 2017 Hi @SamC You should allow segments for the home page and then you can do what you want. But to keep things simple you can just rename "Misc pages" to something like "Info". 2 Link to comment Share on other sites More sharing options...
SamC Posted May 21, 2017 Author Share Posted May 21, 2017 2 minutes ago, Zeka said: But to keep things simple you could just rename "Misc pages" to something like "Info". I think is the best approach. After giving it some thought, there's probably no real need for these pages to appear as top level. Thanks. Link to comment Share on other sites More sharing options...
rick Posted May 21, 2017 Share Posted May 21, 2017 I'm sure there is a ProcessWire way to do it, but I'm not skilled enough yet, so I settled for a document tree that looks like this: /home/policy/tos /home/policy/privacy /home/policy/aup ... which presents urls like, domain.com/policy/tos, etc. Those pages use the 'policy' template so that I can select or exclude them depending on which menu I'm rendering. 1 Link to comment Share on other sites More sharing options...
SamC Posted June 5, 2017 Author Share Posted June 5, 2017 @rick I forgot to ask, how do you handle '/home/policy/'? Does 'policy' have a template file to match the one set in the admin? I set '/misc/' to published but hidden so this page throws a 404. I have no template file for my 'misc-pages' template. All that was supposed to be for was a parent for listing child pages. i.e. I have: /misc/faq/ /misc/privacy-policy/ /misc/cookie-policy/ /misc/terms-and-conditions/ ...with templates set up like this: /misc-pages/basic-page/ If that makes sense. Link to comment Share on other sites More sharing options...
rick Posted June 6, 2017 Share Posted June 6, 2017 Hi @SamC, Yes, my /home/policy page uses the policy template. The /home/policy/privacy and /home/policy/tos pages also use the policy template from the allowed template for children setting. I just redirect /home/policy page to /home/policy/privacy page to prevent access or 404. As I said, there is probably a more ProcessWire-esque way to do it, but I don't know what that would be. 1 Link to comment Share on other sites More sharing options...
SamC Posted June 6, 2017 Author Share Posted June 6, 2017 Thanks @rick I always like to read how other people approach a problem as it gives me more options when said problem becomes one of mine! 1 Link to comment Share on other sites More sharing options...
Mike Rockett Posted June 6, 2017 Share Posted June 6, 2017 Yeah, I tend to stick to the tree-model for this kind of thing. In this case, I tend to use "legal/terms", etc. If need be, there's always Jumplinks for quick redirects. 3 Link to comment Share on other sites More sharing options...
TheMick Posted July 11 Share Posted July 11 Just for future readers looking for an easy solution: If you install the PagePathHistory Module you can add additional paths for a page in the settings of the page. 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