Reply To: How to use s2IF / else properly and a way to substitute user level in a url

Forums General How to use s2IF / else properly and a way to substitute user level in a url Reply To: How to use s2IF / else properly and a way to substitute user level in a url

#520
Joshua Shapiro
Participant

Cristian

I have the welcome pages setup as 1-account-page, 2-account-page, etc …

I tried in my url to use:

[s2Get user_field="s2member_access_level" /]-account-page
but of course this url wasn’t recognized – is there a way
to use some variable for the level that instead of using
s2IF statement it will convert the level # to get me to the right
welcome/member page?

back to Level access versus role —

so you are say if a person is level 1 – as an example
access_s2member_level1 – is a capability – but if there
are no capabilities for level1 and a person is level 1 is it true?

my level2 has two capabilities novel1 and novel2
so it would be current_user_can(access_s2member_level2_novel1)? then

I just saw when I tested the page and I changed
from current_user_can(access_s2member_level4) to current_user_is(s2member_level4)
that I couldn’t see the text for the screen as an admin

also when you say to have no breaking lines between
/s2IF and s2IF/ what would this look like?

this is what I have at the moment:

[s2If current_user_is(access_s2member_level1)]
Home Page: [ <span style=”color: #ff0000;”>click here</span> ]
Logout of Membership: [ <span style=”color: red;”>[logout_to_home text=”click here”]</span> ]
[/s2If]

can you show me how I would change it to eliminate any extra blank lines?

just trying to see the best way to code this part as all levels will access
this page and I want to take them back to their specific welcome/account page

thank you – Joshua