<?php
$extrafields = array();
foreach($this->item->extra_fields as $item)
{ $extrafields[$item->id] = $item->value; }
?>
<?php echo $extrafields[1]; ?>
Hi there,
I'm using this part of php code in my template. So I have title and subtitle (extra fields) in my k2 items.
I'd like to use it in this way:
Every item has a title and I want to display it on home page. So when user click on the main page and open k2 item, I'd like that he would see a second title from extra fields instead of item title. But when item has no second title (extra fields), he would see item title....
Maybe someone help..