INFO: Version en.xAdditional module up to Core Prof. 3 projects

Newsletter template

The newsletter module uses a directory template for new newsletters. This defines the basic structure for a text and HTML newsletter and the required header information for the newsletter emails.

You can access the newsletter template via the directory settings of the newsletters directory if you have the appropriate authorization. BASE provides its own directory template as standard, which you can customize. It is best to create additional templates based on the existing directory template and adapt the corresponding components.

Directory settings - Templates for the newsletter
Directory settings - Templates for the newsletter

In the "Templates" tab of the newsletter directory settings, you can see how many templates already exist. By default, a directory template is supplied, which can be accessed via the"Manage own directory templates" button.

Operation

A newsletter template consists of the following files and directories, which are stored in the template directory.

/yourcontentproject/newsletter/newsletters/weblication/templates/directories/newsletter

The content of this template directory is made up as follows:

  • /config.xml
    Contains the definitions for the header of a newsletter e-mail (from, to, subject) and information on the recipient file, etc.
  • /mail/html.php
    Defines the basic structure of the content page of a newsletter e-mail with the master data of the newsletter (footer with e.g. address details, unsubscribe link, salutation, text, etc.).
    The wd:templates specifications define which view and edit template is used. In the example below, the path specifications are set to inherit. By default, the path specifications are inherited from the default file settings of the newsletters directory.

Below you will find an example of the content or an excerpt of the content of the files mentioned.

Inhalt einer config.xml aus der Newsletter-Vorlage

<wConfig version="1.0">
  <fromName>Newsletter Team</fromName>
  <fromEmail>newsletter@example.com</fromEmail>
  <replyToEmail/>
  <replyToName/>
  <subject>Neuer Newsletter</subject>
  <receiversDir/>
  <receiversFile/>
  <subscriptions/>
  <baseDomain/>
  <!-- optional ab CMS-Version 16 möglich: -->
  <listUnsubscribeMail>unsubscribenewsletter@IhreMailDomain.tld</listUnsubscribeMail>
  <additionalHeaders>
    <additionalHeader name="X-CampaignID" value="$wNewsletterDir"/>
  </additionalHeaders>
</wConfig>

Auszug aus einer Newsletter Vorlage (html.php)

...
...
    
                <wd:object type="newsletter">
                  <wd:data id="title" type="char.text"/>
                  <wd:data id="description" type="char.text"/>
                  <wd:data id="keywords" type="char.text"/>
                  <wd:data id="enableClickAnalyzer" type="char.default">no</wd:data>
                  <wd:data id="footer" type="text.default"><![CDATA[<p>Scholl Communications AG - Elsässer Straße 74 - D 77694 Kehl
Tel: +49 (0) 78 51 / 89 99 99 0 - E-Mail: info@scholl.de
Firmensitz: Kehl am Rhein, Vorstand: Alexander Scholl, 
Aufsichtsratsvorsitzender: Roland Rittner, Handelsregister: Amtsgericht 
Freiburg HRB 371717, USt.-ID-Nummer: DE 813040219
</p>
<p>Wenn Sie diesen Newsletter nicht mehr erhalten möchten, können Sie ihn hier <a href="[%21--wUnsubscribeURL--]">abbestellen</a>.</p>]]></wd:data>
                </wd:object>
...
    
                <wd:templates>
                  <wd:master path="{wGetValueOfDefaultExtension()}"/>
                  <wd:edit path="{wGetValueOfDefaultExtension()}"/>
                  <wd:view path="{wGetValueOfDefaultExtension()}"/>
                  <wd:editExt path="{wGetValueOfDefaultExtension()}"/>
                </wd:templates>
...
...
  
                <wd:group id="content1">
                  <wd:item name="Überschrift" type="headline.text" uid="3d854e211b7643c34addd94f8b45a07d">
                    <wd:fragment id="title" type="char.text"/>
                    <wd:fragment id="display" type="char.display">auto</wd:fragment>
                    <wd:fragment id="text" type="text.standard"><![CDATA[Hallo [!--firstname--] [!--surname--],]]></wd:fragment>
                  </wd:item>
                  <wd:item icon="/[IHR-GLOBALES-PROJEKT]/wGlobal/layout/images/element-icons/element_text.gif" name="Fliesstext" type="text.wysiwyg" uid="eaa83811245a7ad209a42fd6aa315735">
                    <wd:fragment id="title" type="char.text"/>
                    <wd:fragment id="display" type="char.display"/>
                    <wd:fragment id="text" type="text.standard"><![CDATA[<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut commodo pretium nisl. Integer sit amet lectus. Nam suscipit magna nec nunc. In lacus est, bibendum vitae, malesuada quis, lacinia vel, nulla. Aenean varius mauris vitae neque. Maecenas a nibh. Curabitur pretium tortor. Integer nec dolor non ante semper tincidunt. Cras consectetuer mauris vel quam. Morbi tincidunt, urna sed varius pellentesque, ligula justo blandit quam, sed tempus purus mauris sit amet dui. In sapien mauris, eleifend id, malesuada sed, faucibus nec, elit. Quisque facilisis faucibus neque. Sed malesuada mi eget elit. Fusce mauris massa, posuere a, sodales sit amet, egestas id, elit.</p>]]></wd:fragment>
                  </wd:item>
                </wd:group>
...
...

When a new newsletter is created, the directory template is copied and stored as a new newsletter, which is listed in the newsletter overview.

'Tips':

  • Create different newsletter templates, e.g. to address different channels with one mailing (sales partners, customers, interested parties, etc.). In the template, you define which data should be preset for the sender, recipient file, etc.
  • To show the maintenance user only the templates that are intended for them when creating a new newsletter with multiple templates, manually set the sub-node wd:group name="GROUP" in the wDirectory.php of the template in the wd:asTemplate node (where GROUP stands for the group that is authorized for selection).