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.

eZ debug

Timing: Jan 31 2025 01:18:31
Script start
Timing: Jan 31 2025 01:18:31
Module start 'layout'
Timing: Jan 31 2025 01:18:31
Module start 'content'
Timing: Jan 31 2025 01:18:31
Module end 'content'
Timing: Jan 31 2025 01:18:31
Script end

Main resources:

Total runtime0.0282 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.1250151.2109
Module start 'layout' 0.00550.0035 739.3359220.6875
Module start 'content' 0.00900.0172 960.0234997.8984
Module end 'content' 0.02620.0020 1,957.921929.9922
Script end 0.0281  1,987.9141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002910.4633140.0002
Check MTime0.00134.6904140.0001
Mysql Total
Database connection0.00103.483510.0010
Mysqli_queries0.00258.765130.0008
Looping result0.00000.038910.0000
Template Total0.00134.410.0013
Template load0.00103.394710.0010
Template processing0.00031.021610.0003
Override
Cache load0.00062.146410.0006
General
dbfile0.00289.846880.0003
String conversion0.00000.020340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs