is it possible to hook to the change of the url of the default language? it is for not default as described here…
i want to track changes in url to add proper 301 redirects using htaccess or routing.
is it possible to hook to the change of the url of the default language? it is for not default as described here…
i want to track changes in url to add proper 301 redirects using htaccess or routing.
maybe creating a hidden field would be a solution but its still kind of hacky imho.
Maybe add an issue to rename this hook to panel.page.rename
instead? What do you think?
I think it’s more logical this way:
For renaming the slug:
panel.page.rename
For moving page level:
panel.page.move
Your idea is that they should use the same hook? I think it’s two different actions.
Well, that’s kind of true. For me both actions are “the folder name changes”, so I think one hook is fine. But you are of course right that there could be different actions associated with the hooks.
I also think it would make sense to have two different hooks once pages can actually be moved around in the panel.
Would it hurt to have two hooks?
Let’s pretend that we can move level in the panel and that there are two different hooks for rename and move.
Then a real case for it is my revisions plugin. I would do this:
panel.page.rename
)panel.page.move
)Maybe it’s possible to figure out what action is used another way, but it would be much easier if the hook was just there to use.
As I already wrote, that point of view is totally fine. I have seen it differently until now, but I’m not against renaming the hook and then creating a second one in the future.
Only issue: Renaming something always breaks backwards compatibility so we have to be careful how to do it.
I added an issue about it. Then Bastian can figure out what to with it, or discuss it more with you…