Forum Moderators: open
I have a bunch of articles on my home page whose headlines are available to all visitors. When a user clicks on a link, they will need to sign in or register, and then they are brought to the page (i.e. "A" as below). so, how do i inject a validation rule to execute prior to the user being brought to the destination?
For example, with:
<a href="A">A</a>
<a href="B">B</a>
<a href="C">C</a>
before the users sees A, B, or C - they need to login. Can anyone suggest a means to accomplish this?
Thanks!
does this mean that i need to edit each of the links to the articles and create a copy of the page that points to the authenication?
In other words, does this mean my main page has to be something like this:
<a href="login">A</a>
<a href="login">B</a>
<a href="login">C</a>
and after they login, the "proper" links show up?
<a href="A">A</a>
<a href="B">B</a>
<a href="C">C</a>
if so, that is what i am trying to avoid, as the more articles I get, the more annoying the duplication becomes! but if it is what it is, so be it!
does this mean that i need to edit each of the links to the articles and create a copy of the page that points to the authenication?In other words, does this mean my main page has to be something like this:
<a href="login">A</a>
<a href="login">B</a>
<a href="login">C</a>and after they login, the "proper" links show up?
<a href="A">A</a>
<a href="B">B</a>
<a href="C">C</a>
No, this is the exact opposite of what was said. You do NOT need to modify the links themselves. The browser would send a request to the actual link page, where some authentication check would be performed to see if the user was logged in.
the article links<a href="A">A</a>
<a href="B">B</a>
<a href="C">C</a>tend to be external to my site.
Uh... that doesn't really make sense. You can't really force someone to authenticate against your site to view content that is served from some other site.