{let user=fetch( 'user', 'current_user' )
approved=false()}
{section loop=$user.groups}
{switch match=$:item}
{case match=OBJECT_ID_OF_USER_GROUP}
{set approved=true()}
{/case}
{/switch}
{/section}
{/let}
{section show=$approved}
{* THINGS TO SHOW MEMBERS OF GROUP *}
{/section}
okay, thx i'm not sure to understand exactly (because not yet fluant with the templating language) but i think this is not exactly what i meant.
I want to define in the back end, that a specific content will be only available to a specific user or user groupe. I want to do this not once but many times, so i would need to do it using the administration consile, and not via coding.
A solution would be to define an attribute in the class defining my content. This attribute would define the ID of the user allowed to view the content ...
anyone did this this ?
You must be logged in to post messages in this topic!