Specific pagelayout for connected user

Author Message

Pascal France

Thursday 23 February 2006 11:56:18 am

Hi,

I would like to set up specific designs for specific user groups
I tried to create an override like that:

    598 [pagelayout_connecte]
    599 Source=pagelayout.tpl
    600 MatchFile=pagelayout_connecte.tpl
    601 Subdir=templates
    602 Match[node]=xxx

where xxx is the number ID of a user group or a user.
I tried Match[parent_node]=xxx without success too.

It seems it's not the good way to do what I want.

Thanks for your help

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Roy Bøhmer

Friday 24 February 2006 3:09:36 am

Hi Pascal!

As far as I know you can't override based on logged in users.

My suggestion would be to edit pagelayout.tpl and include appropriate css-files and other includes based on the users usergroup. I haven't done it my self, but that information about current user should be pretty stright forward to access in the templates using $current_user in pagelayout.
See http://ez.no/doc/ez_publish/technical_manual/3_6/templates/the_pagelayout/variables_in_pagelayout

I hope someone else has a better solution, because this is defenitly not a nice way to do it if your designs are very different.

Roy

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 18 2025 11:46:12
Script start
Timing: Jan 18 2025 11:46:12
Module start 'layout'
Timing: Jan 18 2025 11:46:12
Module start 'content'
Timing: Jan 18 2025 11:46:12
Module end 'content'
Timing: Jan 18 2025 11:46:12
Script end

Main resources:

Total runtime0.0164 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 589.1484152.6406
Module start 'layout' 0.00570.0028 741.789139.4766
Module start 'content' 0.00850.0054 781.265689.3516
Module end 'content' 0.01390.0024 870.617230.3047
Script end 0.0163  900.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002515.4851140.0002
Check MTime0.00116.6827140.0001
Mysql Total
Database connection0.00074.577510.0007
Mysqli_queries0.002817.377630.0009
Looping result0.00000.086010.0000
Template Total0.00159.410.0015
Template load0.00085.102010.0008
Template processing0.00074.258410.0007
Override
Cache load0.00063.378510.0006
General
dbfile0.00031.806580.0000
String conversion0.00000.061240.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