_item
are the macro type templates in 1.5 IIRC. You will need to find out which template calls that and maybe even trace that back a bit more. Once you get the "parent" template which pumps everything into
_item
, you can modify the variable pushed into the
_item
template by modifying the "parent" template controller.
In
conversation_list_popup
HTML:
<xen:foreach loop="$conversationsUnread" value="$conversation"><xen:include template="conversation_list_popup_item" /></xen:foreach>
So $conversation is actually a template variable assigned on-the-fly, that's why you won't find any controller reference.
This means you can modify
$conversationsUnread
or
$conversationsRead
within
actionPopup()
. Since they are arrays, you can easily attach your own values into that. And
conversation_list_popup_item
does not iterate over each value, so you won't get into trouble there aswell.
Retreiving those messages is another story, you will need to look through the code. Those conversation items should contain (read / unread) the conversation ID at least. So you can do sth like
PHP:
foreach($conversationsUnread as &$conversation) {
$conversation['message'] = $conversationModel->getConversationMessageById($conversation["conversation_id"]); // sth like that
}
and the same for unread.
It would be way better if you could find out where $conversationsUnread is built and extend that method to contain the message from the beginning so you don't have to loop an extra time over the messages, but that's really some next lvl optimizing