How to display CONTENT of a folder in 2 different places

Author Message

Simon Caisse

Monday 21 November 2005 5:16:51 pm

I have an employee list in one location.I would like to display the same list in another location but with a restriction. I only want employees of a certain branch in that other location. Is it possible?

Thanks
Simon

Nathan Kelly

Monday 21 November 2005 8:27:51 pm

Hi Simon, when you say "with a restriction" I assume you mean a user access restriction?

Could you be a little more specific of the structure, when you say "employees of a certain branch" how are your users groups set up etc.?

The more specific you are the easier your question will be to answer.

Cheers!

Pardon me while I burst into flames...

Simon Caisse

Monday 21 November 2005 8:54:19 pm

OK I'll try to be more specific. I have a class employees that contain different attributes: employees(first_name, last_name, phone_extension, branch).
An employee works in a specific branch like corporate Human resources, finance, reception, etc. I created a folder with all employees. I would like now to create another folder that will contain only the employees of the Human Resources branch.

Thanks

Xavier Dutoit

Tuesday 22 November 2005 1:30:47 am

I'd suggest to use the enhanced object relation (eor) attribute
http://ez.no/community/contribs/datatypes/enhanced_objectrelation
for the branch attribute

Create a new content type "branch"

On employee, add the eor attribute and say to select only the objects of the class branch

Create a override the view full for the branch attribute and display the list of the reverse related objects (ie. the employees)

That's it.

You can add or delete as many branches as you want.

X+

http://www.sydesy.com

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 08:11:50
Script start
Timing: Jan 31 2025 08:11:50
Module start 'layout'
Timing: Jan 31 2025 08:11:50
Module start 'content'
Timing: Jan 31 2025 08:11:50
Module end 'content'
Timing: Jan 31 2025 08:11:50
Script end

Main resources:

Total runtime0.0174 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.0068 588.3906151.2422
Module start 'layout' 0.00680.0021 739.632836.7109
Module start 'content' 0.00890.0069 776.343890.2188
Module end 'content' 0.01570.0016 866.562533.9922
Script end 0.0173  900.5547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002615.1222140.0002
Check MTime0.00127.1402140.0001
Mysql Total
Database connection0.00105.514210.0010
Mysqli_queries0.002916.450730.0010
Looping result0.00000.052110.0000
Template Total0.00127.210.0012
Template load0.00105.537510.0010
Template processing0.00031.586310.0003
Override
Cache load0.00074.014310.0007
General
dbfile0.002313.246780.0003
String conversion0.00000.034340.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