Conditional for coming from a rejected page?
-
I direct people to the membership page when they reach a page that they don’t have access to, but it’s the same page that I direct people to to sign up for membership. I want a line at the top of the page that says they reached that page because they don’t have access to the content they tried to reach, but only when that’s the case. When the user goes directly to that page, I don’t want them to be told they’re there because they reached content they can’t access.
At first I thought to use a conditional like:
[s2If !current_user_can(access_s2member_level1)]
You have tried to access a page that requires Membership.
[/s2If]but while that prevents existing members from seeing that when they go to the membership page, it doesn’t prevent public users or registered users (who have no become members) from seeing that text at the top of the page, which they should only see if they get there by reaching a page they can’t access.
The easy answer is to have two membership pages, but I thought the idea was to direct to your normal membership page, so it seems there should be a way to do this properly.
Thanks.
- The topic ‘Conditional for coming from a rejected page?’ is closed to new replies.