In com_content
I can call my fields one by one as follows
<?php echo $this->item->jcfields[3]->value; ?>
The same code does not work in com_contacts
. How can I call the fields in a custom override in com_contacts
?
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It only takes a minute to sign up.
Sign up to join this communityIn com_content
I can call my fields one by one as follows
<?php echo $this->item->jcfields[3]->value; ?>
The same code does not work in com_contacts
. How can I call the fields in a custom override in com_contacts
?
You may find this helpful, I did.
https://docs.joomla.org/J3.x:Adding_custom_fields/Overrides
It has been years, but if you examine your array you will find the proper value of [#]. You can then modify your code.
Add this at the bottom of your override to see the contents of the array:
snippet: echo '<pre>'; print_r($array); echo '</pre>';
var_dump($this->item);
?null
null
if Ivar_dump
$params