The template "reaction_list" starts with:
wherein
Now,
The code works with one exception: opening the reaction list in Thread view triggers a server error logged in ACP as "Accessed unknown getter 'Conversation' on XF:Post[XXX]." This, I assume, is caused by
How can I stop the server error from occurring while retaining the functionality of the above code?
HTML:
<xf:if is="$title">
<xf:title>{$title}</xf:title>
<xf:else />
<xf:title>{{ phrase('members_who_reacted_to_this') }}</xf:title>
</xf:if>
{$title}
retrieves members_who_reacted_to_message_x
if the reaction list is opened in Thread view, or members_who_reacted_to_message_by_x
if the reaction list is opened in Conversation view.Now,
members_who_reacted_to_message_by_x
contains the variable {user}
whose initial value I want to replace with that of a custom user field. To achieve this I've come up with the following code:
HTML:
<xf:if is="$title AND $content.Conversation">
<xf:title>{{ phrase('members_who_reacted_to_message_by_x', {'user': $content.User.Profile.custom_fields.test}) }}</xf:title>
<xf:elseif is="$title" />
<xf:title>{$title}</xf:title>
<xf:else />
<xf:title>{{ phrase('members_who_reacted_to_this') }}</xf:title>
</xf:if>
$title AND $content.Conversation
when it is parsed in Thread view.How can I stop the server error from occurring while retaining the functionality of the above code?