Reutilizing information to create a object

Author Message

Natalia Lillo

Wednesday 23 November 2005 11:18:17 am

Hi!
My questions is this,
in the interface administrator( or other way),How I can to reutilize the information that exists in other object??,as of this to create other using some information, for not to duplicate information, e.g., if to create an user, can I reutilize his information (name, email, and so on) to create a contact person?

I hope you can unaderstand me....

Thanks,
Natalia

Marko Žmak

Wednesday 23 November 2005 2:11:22 pm

You could try with object relation. For example you could have a class "Contact person" that has a related object attribute that connects to a user object.

Or the other way arround, to have a related object attribute in "User" class that connect to an object of "Contact person". This is the first thing that came in my mind. There are of course other ways to do this, but depends on what do you exactly want to do.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Natalia Lillo

Thursday 24 November 2005 4:26:45 am

Hi Marko,

Thanks, I'll do what to told me...

Cheers.

Natalia

Natalia Lillo

Thursday 24 November 2005 6:32:47 am

I made what to told me that way:
First, I added to the class "Person" the attribute "object relations" and I added the class "User" and "User Group" in the TAB set up/classes, then I create an object "Person" and appears the option to add objects relations, then I added the user "Natalia Lillo" like an object related and I had that to complete all information again, in place of that copy the information the object "User" to not to enter again.

I dont know if you unaderstand me, I hope yes

¿Exists a class Directory, with have several "Contact Person"? like an array of contacts?.

Natalia

Nathan Kelly

Friday 25 November 2005 5:05:21 am

Hi Natalia, if I understand you correctly I believe what you are trying to do is create a page (or pages) where users can view other users information?

This tells me you don't want them to be able to see each others passwords, but Name, email, ICQ, MSN etc. should be public.

If this is the case I would suggest you do this with templates and "roles & policies". Basically you can output user information into a template but usualy this information would only be accessible by the owner.

So you would need to create a "role" that would allow users to see "permitted" information (name etc.) but hide "privileged" information (password etc.), likewise you will have to create a template to fetch this information. This would bypass the need to create a second class (the Person class).

Unfortunately I'm not sure how to do this, but I will look into it for you, if you consider this forum for a moment I can see your name, the date you joined and your avatar (if you had one), but not your password or email address.

This means the answers to what you are trying to do may be found in the templates for the eZforums, if they can display this information here it should be possible to do something similar in a contact list.

I will take a look at some templates and see if I can help, in the mean time, I suggest you look at the forum templates to see how they fetch this information.

Also if anyone knows what sort of roles and policies it would take to set this up please let us know, I think it would benefit many people who may come across similar needs.

Cheers!

Pardon me while I burst into flames...

Rubén Valenzuela

Monday 28 November 2005 6:03:31 am

Hi,

I don't offer any answers, but allow me a couple of questions:

1.- Does EZ have a native 'contacts' module - like outlook - where I can load all the company contacts, as the case of an intranet, that would equal the accounts. And on a second level personal contacts, viewable only by the person who adds them

2.- If not, it seems natural to build a contacts extension having all the accounts registerd on a certain domain - e.g. intranet - as its base of information. The primarily reason for this is not having to duplicate information and management of such everytime an account status changes.

Regards

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