how to do some personalisation ?

Author Message

orlando gall

Thursday 13 January 2005 12:53:13 am

I want to tell ezPublish a specific content to be displayed to a specific user only or a specific group of users.
how to setup this kind of personalisation rules ?

anyone has an idea ?

Eivind Marienborg

Thursday 13 January 2005 3:14:55 am

{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}

This works at my site, I think-

orlando gall

Thursday 13 January 2005 7:33:43 am

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 ?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.