Follow the steps of the general setup for Hippo Community Apps.
Required settings
Additional properties are required for the Newsletter Manager. Add the following properties to the build.properties file:
hca.smtp.host=localhost
hca.mailaccount.from=user@domain.tld
hca.uniquehost=${maven.cocoon.site.domain}:${maven.jetty.port}
Customize the look and feel of your newsletter
The standard newsletter manager displays the newsletter just as the XML is stored in Hippo Repository. The newsletter manager can transform the XML into the markup of your newsletter (html or text) using XSLT.
Add the following files to your project root
- LOCATION/newsletter-html-TEMPLATE.xsl for the HTML version
- LOCATION/newsletter-text-TEMPLATE.xsl for the text version
LOCATION can be one of the following
- Hippo repository: http://localhost:60000/default/files/default.preview/newsletter

- The folder for CMS extensions: EXTENSIONS/newsletter/transformers In the binary distribution, EXTENSIONS is sites/hippo-cms-extensions, but this can be a different location in a customized project.
TEMPLATE can have the following values:
- intranet
- internet
- extranet
The servername for images and internal links is passed to the xsl as
<map:parameter name="siteUrl" value="{flow-attr:siteUrl}"/>
The siteUrl is configured from the Template tab in Hippo CMS. It must start with http:// (or https://) and must not end with a /, e.g. http://www.hippocms.org
.
Another parameter that is passed to the XSL transformer is self with the path of the document that is used as input for the newsletter.
The IncludeTransformer is called after this transformation.
Document picker
The document picker displays all document types. To filter on the type of your newsletter, add newsletter="true" to the resource element of your newsletter in types.xml. In this example the types are defined in the cocoon/types directory.
Example:
<types xmlns:i18n="http://apache.org/cocoon/i18n/2.1"> <resources default="text"> <!-- other resources (document types) can be defined here --> <resource name="newsletter" label="types:cms.types.label.newsletter" i18n:attr="label" newsletter="true"> <schema>context://types/newsletter/newsletter.xsd</schema> <template>context://types/newsletter/newsletter.xml</template> <css>context://types/newsletter/newsletter.css</css> <layout>context://types/newsletter/layout.xml</layout> <bl>context://types/newsletter/business_logic.xml</bl> <i18n>context://types/newsletter/i18n</i18n> </resource> </resources> </types>
|
The following settings are only used in version 1.01.01 |
Required settings
Add the following property to the build.properties file:
# cms.newslettermanager.liveserver may be used for pictures and links in the mail body
cms.newslettermanager.liveserver=www.mysite.tld
Customize the look and feel of your newsletter
For customizing the look and feel of your newsletter add the following files to your project root
- extensions/newsletter/newsletter-html.xsl for the HTML version
- extensions/newsletter/newsletter-text.xsl for the text version
The servername for images and internal links is passed to the xsl as
<map:parameter name="server" value="http://{globalconstants:cms-newslettermanager-liveserver}"/>