I want to add the value of a custom field to a category-blog overide.
I have done this several times on an article overide, but on a blog overide it doesn't work.
I use this code at the top of the override
Code: Select all
<?php $myfield = $this->item->jcfields;
foreach($myfield as $field) {
$myfield[$field->name] = $field;
} ?>
Code: Select all
<?php echo $myfield['name-of-field']->rawvalue; ?>
Yes, it is a custom field for category.
Yes, the field is published etc, it displays fine on the location set at Automatic display.
What am I missing?
Tried both on J3 and J4.
Thank you.
Wim