Closed emmanuelmillionaer closed 7 years ago
@MrTin big thanks for the comments on this PR! 💯 Could you please further explain what you mean with: 🙂 where to redirect on all page links? Can you find a way to only do this when you actually delete a page?
Here to all page-delete
-links I always pass (optionally)the current-page. So that it redirects to it, after the page was deleted. That's because when the user is for example on the marketing-page and he deletes the globalstrategy-page I thought he should end again on the marketing-page. It's basically a redirect :back
I only perform queries when the user actually is, on the page he deletes.
You are right that in Page::NextPageQuery
there are a lot of if/else and closure-tree methods called to find the next page. First I had a custom query there, with that I tried to find the next page, but I noticed that it's better to use the predefined closure-tree methods for that.
Thanks for clarifying @emmanuelmillionaer. Lets talk over phone so I better understand what you are doing here :)
What
After a page get's deleted, redirect to the correct path
Gif (optional)