How to make links inside “if logged in” tag to show certain links only to special member group members?
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
July 18, 2007 4:33am
Subscribe [2]#1 / Jul 18, 2007 4:33am
How to make links inside “if logged in” tag to show certain links only to special member group members?
#2 / Jul 18, 2007 4:58am
group_id
{if group_id == '7'}
You’re an “Editor”!
{/if}
#3 / Jul 18, 2007 5:02am
So this should work just fine then:
{if logged_in}
<a href="http://{path=member/memberlist}">Members</a>
{if group_id == '7'}
<a href="http://{path=template_group/template}">Special page</a>
{/if}
{/if}?
#4 / Jul 18, 2007 5:37am
This is supposed to work, yes.
All logged in users ought to see the Members-link.
And only users that belong to member group 7 ought to see the Special-link.
#5 / Jul 22, 2007 4:15pm
What about if want to put 2 different groups to that variable? I did try this:
{if group_id == '7|8'}but it didnt work…
#6 / Aug 25, 2007 3:02pm
So there is no other way to do that than put so many {if}s as needed? (it makes file bigger…).
#7 / Aug 25, 2007 5:59pm
you could use an if with two conditions
{if group_id == '7' || group_id == '5'}
Special Output Here
{/if}
#8 / Aug 25, 2007 6:53pm
ah that way it shortens the list of if’s. thanks!
- Tuittu