Mailing List - Customization

1 view
Skip to first unread message

Seann Aswell

unread,
Mar 14, 2024, 5:25:11 PMMar 14
to Zotonic developers
While testing mailing list functionality, I noticed an issue, and am unclear where to look for a solution...

So, on several websites I have created a new category called "Photos", as a sub-item of "Media", and use the built-in category of "Images" for any still media that is not a photo. There is much logic build around this method of categorization, such as displaying different metadata for a photo than an image, which is why this approach was taken.

However, this appears to cause an issue with "mailing_page.tpl" as any resource in the category "Photos" is not displayed.

I believe this is the code that imports the body of the resource:
from mailing_page.tpl
{# Main body of the message sent. #}
{% block body %}
{% with m.mailinglist.subscription[list_id][email] as sub %}
{% filter inject_recipientdetails:sub %}
{% inherit %}
{% endfilter %}
{% endwith %}
{% endblock %}

It appears the "inherit" function is responsible for importing the resource body, but it does not point to a .tpl so I am not able to dig any further for a possible solution.

Any suggestions on how to modify the mailing list functionality to include a new sub-category of Media to the body of a resource to be displayed?

Hopefully my question is clear, but let me know if there are any questions or recommendations on how to handle.

Seann Aswell

unread,
Mar 14, 2024, 5:56:51 PMMar 14
to Zotonic developers
Okay, issue resolved, it was user error... In the template "email_base.tpl" the "email/_body_media.tpl" is referenced, and I was able to add the new category there.

I just have to say, the longer I use Zotonic, the more impressed I am with both it's flexibility and comprehensive amount of built-in functionality. Many, many thanks to you and the other contributors for this amazingly well designed piece of software.
Reply all
Reply to author
Forward
0 new messages