sigil88
5/4/2017 - 9:23 AM

joomla 3.7 custom fields front end com_content override for ref: https://www.giudansky.com/news/12-coding/146-joomla-custom-fields

joomla 3.7 custom fields front end com_content override

for ref: https://www.giudansky.com/news/12-coding/146-joomla-custom-fields

<?php

$jcFields = $this->item->jcfields;

$customFields = array();
foreach ($jcFields as $field) : 
	$customFields[$field->name] = $field->value; ?>
	<pre>
		<?php echo $customFields['team']; ?>
	</pre>
<?php endforeach; 
// alternative joomla version:

// yay custom fields 
 foreach ($this->item->jcfields as $label => $field) : 
	// Render the field using the fields render method
?>
	<?php if (!empty($field->value)) : ?>
	<dl>
		<dt><?php echo $field->value; ?></dt>
	</dl>
	<?php endif; ?>
<?php endforeach 
// end custom fields