Hm, yes, but that does not help if you have links to a particular page on the frontend and want to link directly to a page in the backend, which works perfectly if you are logged in but not otherwise. Then keeping the last page on track doesn’t make much sense.
so far it was just the hacky way to see if it works or not, so the code after else was a direct copy and paste from the docs with editing the $uid part so…
my use case would be: a QR code is scanned which has either the panel-subpage or page-url/login (as above) to quickly being able to access and change a few values on that page, a login is inevitable, so since since the panel always redirects towards main/parent i am looking for options…
e.g. a delivery / invoice has the QR Code, some operator/package handler/whoever scans the package, and can proceed to mark it as “shippment has arrived” status.
Yes, my approach was different and even my case. Personally, when I edit a page, save a few times and suddenly get thrown out, I want to login where I was, not on the panel root. For that my solution would work, but yes it’s a bit different.
@carstengrimm I like the idea of your approach with the route, but it can be a bit weird for routed pages.
articles/cases/project-a // Routed from projects/project-a
articles/cases/project-a/login // FAILS - Page id can't be found
projects/project-a/login // WORKS - The real page id + login
so articles/cases/project-a/login would not work here. We can’t just “hang on” login in this case.
But not all people are using routed urls. I use them a lot because I often have a parent folder as content “wrapper”.