klox7 VIP
Total posts: 914
08 Oct 2014 11:56

If I'm right you can display Cobalt fields from multiple types in one list template simply by adding <?php echo $item->fields_by_id[ID]->result; ?> to your list template.

So if I have Type1 with field ID 1 and Type2 with field ID 2 I can do this in my list template:

<?php echo $item->fields_by_id[ID1]->result; ?>
<?php echo $item->fields_by_id[ID2]->result; ?>

and it will display both fields in same template. Is this OK?

Last Modified: 16 Oct 2014


Sergey
Total posts: 13,748
16 Oct 2014 01:44

I overlooked this. Please change $db->loadResult() to $db->loadObject()

Replay Topic
Uploading
Click here to upload and insert file from you hard drive: (png, gif, jpg, jpeg, zip, txt, rar)
Powered by Cobalt