-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
[FR] When changing a slug of an entry in a structure, add redirects for childs #23
Comments
As in for a structure? |
Yeah! |
This is something I'm running in to as well. We have a structure for pages which are accessed by slug; for example:
Changing |
Yeah these two are essentially the same thing. I agree it'd be a good feature to add |
Any update on this? This would be an essential feature for multi level structure pages. Because if you would make such a redirect in .htaccess the order of the redirects is important for URLs beginning with the same pattern. |
@development-lameco The feature hasn't been added yet, but good to hear you are interested |
So I've actually put a good bit of thought into this, over quite a bit of time. Here's the thing... we're thinking about this from the perspective that in a structure, there's a hierarchy, and it makes sense to us that the URL might be built based on their hierarchy. However, the way the URL rules are done, it's completely free-form. You could write URLs that have the parent URL in the last segment, or depend on things in arbitrarily unusual ways. So we can't just "update all the children's URLs" because we have no idea if your URL format actually affects things in that manner. The same with changing the level of a structure; in the default setup, that changes nothing in terms of the URL. In some custom setups, it might change the URL, but exactly how is up to you, and how you wrote it. So I'm left with not really having a clear idea how I could implement this feature in a way that would work universally. I could write it such that it'd work if people did common things that made sense (like parent-child relationships with items in the structure), but it wouldn't cover it all. |
That would work for me, and, as you mentioned, probably the most common way that people use Structure Section types. In other words: entry uRLs reflect the Structure hierarchy. |
Well, what I'm trying to express is that I'm reluctant to come up with an implementation that makes assumptions, and is not universal. The only way I can see this always working for everything is if I either:
|
You are right, didn't think about that. |
So when changing an entry's slug, a redirect is created for the entry, but if it has childs that depend on the slug for their own urls, they don't have a redirect.
The text was updated successfully, but these errors were encountered: