Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve PagePathHistory to support urlsegments #338

Open
adrianbj opened this issue Oct 23, 2019 · 1 comment
Open

Improve PagePathHistory to support urlsegments #338

adrianbj opened this issue Oct 23, 2019 · 1 comment

Comments

@adrianbj
Copy link

adrianbj commented Oct 23, 2019

Short description of the enhancement

It would be great if PagePathHistory could support urlsegments so that a URL like:

/subscribe/testcoupon/

would be rewritten to:

/buy-now/testcoupon/

if the page with name subscribe was renamed to buy-now and the page's template makes use of urlSegment1 to get the value for a coupon code entered in the url.

I am curious whether you ever tried to support this or not. I expect it will be a little tricky but my hunch is that it should be doable. Let me know if you interested in supporting or not and if not, I might see about supporting it via a third party module.

Thanks for considering.

@adrianbj
Copy link
Author

PS I know there will be lots of problems to support all possible scenarios, but perhaps if only first level pages (those directly under home) were supported, we could simply strip off everything after the second forward slash and assume those are urlsegments and simply find the page that matches the ID of the page whose name was changed and then re-append all those segments as they were in the original URL. I know this wouldn't solve the problem for all setups but I bet it would handle most.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant