This project is read-only.

Parts containing parts

Dec 24, 2010 at 8:44 AM

I know itsn't possible (yet)
But there must be a workaround?

I have a address part.
I have a customer part.

In that customer part i want to add the address part.
If the customer part would be a contentitem then it won't be useable as a part...

PS: Or can one controller work with multiple contentitems?

Dec 24, 2010 at 9:06 AM

You might want to consider a field: a part has fields.

Dec 26, 2010 at 11:05 PM
Edited Dec 26, 2010 at 11:06 PM

I think solving your problem with Address part can lead to future problems, as I suppose Customer can have multiple addresses. Maybe try to rewrite it using relations. Create separate AddressInfoRecord (just a db record, not a part), related 1-1 (or *-1 if you like) with Address part and *-1 with Customer part (Bertrand wrote a nice docs article about it).

Each type can have only one part of a given name attached to it, so putting the inner data in a separate record/s seems reasonable - you can't attach multiple Address parts to a type...

- Piotr

Dec 27, 2010 at 6:54 AM
bertrandleroy wrote:

You might want to consider a field: a part has fields.

if I build an address as a field, can my customer part contain multiple (1-*) address fields?