Guest
03 May 2012 07:20

Hello,

i remeber that in Mighty resources tere was the possibility to create custom template using "ifields" sintax. This was very useful if you to deeply customize a template.

Is this possible in Cobalt too?

Last Modified: 02 Mar 2014

Official Answer

In cobalt it is different. now every record has few fields array

$item->fields_by_id;

$item->fields_by_key;

$item->fields_by_groups;

If you need to call field by ID

$item->fields_by_id[23]->result;

If you have parameter in template parameter with field selector, field key is saved rather than ID.

<field name="field" type="meresourcesfields" label="Field" />

If this is a template parameter then in template.

$params = $this->tmpl_params['list'];

$item->fields_by_key[$params->get('tmpl_params.field')]->result;

Something like this shortly. later I'll write extensive article on this subject.

Powered by Cobalt