Jump to content

Subpage make URL as if top level


SamC
 Share

Recommended Posts

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:

59216fb990727_Screenshot2017-05-2111_39_35.png.cbce76af6266c1659a13b8cf93701801.png

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

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

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.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

@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

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

  • Like 1
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...