Closed jdbit closed 2 years ago
No, django-comments-xtd does not provide anything in particular. But you can implement a simple_tag like the following in your templatetags
directory:
@register.simple_tag(takes_context=True)
def get_parent_comment(context):
return XtdComment.objects.get(pk=context['comment'].parent_id)
And use it in the email_followup_comment.txt
template:
{% load your_templatetags_module %}
[...]
{% if comment.parent_id != comment.pk %}
--- Parent comment: ---
{% get_parent_comment as parent %}
{{ parent.comment }}
---
{% endif %}
That would make it.
Thanks! I'll use the template tag then.
Hi, is there a method to get a parent comment text (if a user replied to some comment) in the followup email notification template?