Save URL before sign in or sign up

Is there a way to save the URL and at the end have the user return to where they were trying to log in from?

/blog/homeoffice-praxis-tipps

  1. User is on the homepage
  2. Click on sign in in the header
  3. Going to the login page
  4. Filling out the form

The user should be redirected to the homepage.

  1. User is on the blogpage
  2. Click on sign in in the header
  3. Going to the login page
  4. Filling out the form

The user should be redirected to the blogpage.

  1. User is on a blogpost
  2. Scrolling down to the comments section
  3. Login is necessary (form is displayed)
  4. User don’t have a account
  5. Click on “sign up” and redirect to the sign up page
  6. Insert E-Mail and password
  7. Going to the thanks page

On the thank you page there should be a “Back to article” button with the URL of the blogpost from where it came in the beginning to create an account.

Yes, that is possible. You can store the current location in the session, then retrieve it from the session after login.

Do you have any idea how this works in the context of Kirby?

There’s a chapter about sessions in the docs: Sessions | Kirby

Another option would be to pass the referrer via a hidden input field