Saving content in the platform's CMS database allows it to be reused in different contexts.
Predefined types (System content) are already saved in the platform, which you can call up in your code. You can always extend the properties of these predefined types.
Finally, you can create your own content type by means of a Content Template, which must be made in the section: Journey Lab > Template > Content.
System content
The following is the list of contents that are already prepared and can later be extended in the template:
- object: is the base object;
-
html: extension of object;
It accepts as parameter description of type html ([param:description]
); -
content: extension of object.
Accepts as parameters:
-
title (of type text)
[param:title]
; -
description (of type html)
[param:description]
( description contains the abstract of the object); -
link ( url type)
[link:landingpage]
; -
taglist ( taglist type)
[param:taglist]
;
-
title (of type text)
- link: extension of content that lacks the description parameter.
-
article: content extension.
Accepts in addition to title, description, link, and taglist parameters:
-
image ( image type)
[param:image]
; -
content ( html type)
[param:content]
(content contains the depth of the object).
-
image ( image type)
Extension of types
Starting from an object type, it is possible to create subtypes, useful for creating, for example, a variant of the main object.
In subtypes it will not be necessary to re-declare the parameters of the initial object.
To create the new object type, it is necessary to add mn:extends
and indicate the type of the object that will be extended.
Creation of typedef
<div mn:typedef mn:name="product" mn:label="Product">
<meta mn:param mn:name="productname" mn:type="text" mn:default="Product">
<meta mn:param mn:name="productprice" mn:type="text" mn:default="100">
<h2>[param:productname]</h2>
<h3>Prezzo: [param:productprice]€</h3>
</div>
Creation of extends
<div mn:typedef mn:name="productdiscount" mn:extends="product" mn:label="Discounted product">
<meta mn:param mn:name="productnewprice" mn:type="text" mn:default="50">
<h2>[param:productname]</h2>
<h3>Scontato: [param:productprice]€ [param:productnewprice]€</h3>
</div>
Printing the two objects
<div mn:container mn:repeatable mn:type="productdiscount" mn:min="1" mn:max="1"></div>
<div mn:container mn:repeatable mn:type="product" mn:min="1" mn:max="5"></div>
In case you want to add one or more link others than [link:landingpage]
for which to generate statistical events on the tags in the taglist, you can:
- Declare the same content/article taglist:
<a href="[param:link2]" mn:taglist="[param:taglist]">stessa taglist di content/article</a>
- Declaring a different taglist:
<meta mn:name="taglist2" mn:type="taglist" >
<a href="[param:link2]" mn:taglist="[param:taglist2]">nuova taglist</a>