Say I have a page, named, oh,
I only want members to be able to see it.
In that page's yaml front matter I have:
--- title: Pot of Gold! _protect: allow _logged_in: true ---
Thus, when someone types in the URL,
http://my-spiffy-site.com/pot-of-gold and they are not already logged in, they get redirected to my spiffy site's members login page. So far, so good. But, next: fail.
For the life of me, I cannot figure out what needs to go where in order to have the successfully logged-in user, once they've completed the form, get automatically redirected back to the url they requested, namely
http://my-spiffy-site.com/pot-of-gold. Yep, I could hard code it, but that's not the point: I have many pages that I want to protect, so it's gotta be done using a variable, a URL hack/snipping/sniping/son-of-a-gun/something or other.
I have read, re-read, and re-re-read the documentation, and I don't GET the
GET stuff. Eh? It neither ignites a sufficient number or neurons nor make my "monkey-see-monkey-do" monkey very happy. I have spent much time trying various things involving quotes, no quotes, single braces, no braces, belts, thumbtacks, baling wire and twine... All to no avail.
Code snippets for a working example would be much appreciated! (Already be on github? If so, I couldn't find it. :-(
Me = Soggy camper, caught out in a downpour, middle of the woods, no tent.