Created
January 27, 2016 17:58
-
-
Save kricore/3a09fb255a9cd4f7f1a0 to your computer and use it in GitHub Desktop.
Hack: Add an extrafield to K2 feed items' title. Part of the view.feed.php item
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fields = json_decode($item->extra_fields); | |
$item->title = $this->escape($item->title); | |
if ($fields[0]->value && $fields[0]->value !== '') | |
{ | |
$item->title = html_entity_decode($item->title.' - '.$fields[0]->value); | |
} | |
else | |
{ | |
$item->title = html_entity_decode($item->title); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment