Forums / Developer / How to display CONTENT of a folder in 2 different places

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