apply one aspect as multiple type to content type

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member

apply one aspect as multiple type to content type

I have person content model where all the person related properties are present. I want to create an aspect for contact with properties like streetname,city,state and country. Now person can have multiple addresses like current address, permanent address or office address. my question is can we apply contact aspect to person content type where all the addresses are handled. I have read that one content type will have unique properties so how can we add multiple addresses to person content. please help

3 Replies
Highlighted
Master

Re: apply one aspect as multiple type to content type

You'd have to create multiple nodes with the address properties and associate those nodes with the person, e.g. via a child-association. The drawback of this is that this would not be supported for display and editing in the Share user profile page. An alternative would be to simply duplicate the fields for street etc. for all the various addresses, i.e. have a workStreet, homeStreet etc.

Active Member

Re: apply one aspect as multiple type to content type

Thank you for your input. I would explain what I want in detail. I have one person who has two addresses home address and office address. when I am viewing properties of this person on share i should be able to see the properties with labels like home address1, homecity,homestate,homecountry and officeaddress1,officecity,officestate,officecountry. I want to create an aspect for contact  which will have generic properties like address1,city,state and country. now I have person content type and contact aspect and my requirement is to add two addresses. please help.

Highlighted
Master

Re: apply one aspect  as multiple type to content type

I already understood your initial question in that way. And my answer remains: Having a generic "contact" aspect would require you to create multiple sub-nodes for the person to manage their separate types of contacts. The Share UI is not capable at this time to display fields for data from sub-nodes in the user profile page, and likely never will be (Share is not really developed / enhanced any more by Alfresco). So I recommended the alternative, which may be less ideal from a data management perspective: instead of having one aspect with generic contact fields, have one or many aspects where fields are duplicated for each type of contact you want to maintain.