Author Topic

Guilherme Longo

Thursday 20 September 2007 4:48:07 am

Comment25160

Mates

I almost get to make by this way:

{def $user=fetch( 'user', 'current_user' )}

{foreach $user.groups as $key => $group}
{def $group=fetch( 'content', 'object', hash( 'object_id', $user.groups[$key] ) )}
{if $group.name|eq(Webeditors)}

<li><a href={"/eng/site_admin"} title="Admin Interface">Admin Interface</a></li>

{else}

.....
...

But, the problem is all users belong of 2 groups (Main Group: User) and your Children: Editors or whatever. I need change this role <b>{foreach $user.groups as $key => $group}</b>, using foreach will go to be impossible.