I hope I will ask this as celar as possible...
I have several content types with different fields and different number of fields. For all sections and content types I would like to use only one template. I know Cobalt already has core templates and you can use one for several types (using php foreach ($item->fields_by_id AS $field):) but I don't think that's what I want.
Examples:
* Type1 -> fields a, b, c, d, e
* Type2 -> fields 1, 2, 3, 4, 5
* Type3 -> fields a1, b2, c3, d4, e5
Let's say we have 3 divs - top, main, bottom.
I would like to display fields like this (fields have to corespond to content type):
* div.top -> fields d, e
* div.main -> fields a, b, 4, e5
* div.top -> fields 3, b2
So if I'm in record list of Content Type1 I would like to display in div.main only fields from this Type (a, b). Even though there are also other fields form other content types added template. If I'm in record list of Content Type2 then in div.main there is field 4.
Is there any good practice how to achieve this?
I hope I will ask this as celar as possible...
I have several content types with different fields and different number of fields. For all sections and content types I would like to use only one template. I know Cobalt already has core templates and you can use one for several types (using php foreach ($item->fields_by_id AS $field):) but I don't think that's what I want.
Examples:
* Type1 -> fields a, b, c, d, e
* Type2 -> fields 1, 2, 3, 4, 5
* Type3 -> fields a1, b2, c3, d4, e5
Let's say we have 3 divs - top, main, bottom.
I would like to display fields like this (fields have to corespond to content type):
* div.top -> fields d, e
* div.main -> fields a, b, 4, e5
* div.top -> fields 3, b2
So if I'm in record list of Content Type1 I would like to display in div.main only fields from this Type (a, b). Even though there are also other fields form other content types added template. If I'm in record list of Content Type2 then in div.main there is field 4.
Is there any good practice how to achieve this?