What is GoodNewsGetNewsletters?
GoodNewsGetNewsletters is a Snippet to get a list of sent newsletters of the actual or a specified Mailing container. It's main purpose is to be used in conjunction with a GoodNews Mailing container to achieve a kind of newsletter archive (like a news archive).
How to use the Snippet
You need to place the GoodNewsNewsletters Snippet in the content area of the Mailing Container you like to get the newsletters listed.
Default properties for the Snippet
The GoodNewsGetNewsletters Snippet implements the following properties:
||The ID of a GoodNews Container. If set, newsletter Resources will be fetched from this container.||The current Resource ID|
||Name of a chunk serving as a newsletter Resource template. If not provided, properties are dumped to output for each resource.||sample.GoodNewsNewsletterRowTpl|
||Field to sort by for fetched Resources.||publishedon|
||Sort direction for fetched Resources.||DESC|
||Indicates if the content of each Resource should be returned in the results.||0=false|
||Limits the number of resources returned. Use 0 or leave empty for unlimited results.||10|
||An offset of resources returned by the criteria to skip.||0|
||The name of a placeholder indicating the total number of Resources that would be selected not considering the limit value.||total|
||An optional string to separate each tpl instance.||\n|
||If set, will assign the result to this placeholder instead of outputting it directly.|
An example (minimal) GoodNewsGetNewsletters Snippet call would look like this:
GoodNewsGetNewsletters also comes with a default tpl Chunk sample.GoodNewsNewsletterRowTpl:
<div class="newsletterrow"> <h3 class="newslettertitle"><a href="[[+url]]">[[+pagetitle]]</a></h3> [[+introtext:notempty=` <p class="newsletterintro">[[+introtext]]</p> `]] </div>