I am trying to customise the way the article custom fields are displayed on the category blog page. At present they are displayed in a vertical list:
What I would like to do is display these in a table, whereby the Field Name/Titles are displayed horizontally across the top of the page and then each articles custom field 'values' are displayed underneath the correct custom field heading.
I have created an override of the custom fields render.php but cannot see how on earth I can do this.
The code involved is:
foreach ($fields as $field)
{
// If the value is empty do nothing
if (!isset($field->value) || $field->value == '')
{
continue;
}
$class = $field->params->get('render_class');
$layout = $field->params->get('layout', 'render');
$content = FieldsHelper::render($context, 'field.' . $layout, array('field' => $field));
$output[] = '<dd class="field-entry ' . $class . '">' . $content . '</dd>';
}
if (empty($output))
{
return;
}
?>
<dl class="fields-container">
<?php echo implode("\n", $output); ?>
</dl>
I'm trying to figure out how I can strip the headers from the DD tag but still preserve the content and position them under the correct heading?
Any pointers would be most welcome. The sample page can be found here
Thank you in advance.
Donna