my site is offline right now, so it can be checked. The thing is, that I want to get one field from extra fields of a K2 item.
there is a place of the images wrapper in controller.php:
- Code: Select all
for($i = 0; $i < count($this->parent->content); $i++) {
if($this->get_image($i)) {
}
}
how should I get extra fields from the k2 item? sure, I added extra fields to k2, category and items.
this doesn't work:
- Code: Select all
for($i = 0; $i < count($this->parent->content); $i++) {
if($this->get_image($i)) {
$extra_fields = json_decode($this->parent->content[$i]->extra_fields);
echo ''.implode ("|",$extra_fields).'';
}
}