The following is a list of the most commonly used attributes in the Giotto language.
Name | Description | Example |
---|---|---|
mn:attr-* | It is used to get a faithful preview in the design tool with which you are editing code or in the offline browser. | <table bgcolor="#0000ff" mn:attr-bgcolor="[param:mycolor]"> |
mn:checkmin | Criterion for defining whether the communication has enough content. | <span mn:container> < meta mn:checkmin mn:type="TypeA" mn:min="5"> <span mn:container mn:repeatable mn:type='TypeA'></span> |
mn:container | Containers are used to define configurable and repeatable objects. | |
mn:conversionlink | Turns a simple link into a simple coversion link. | |
mn:default | Allows you to configure the default value of an object. | <meta mn:param mn:name="mytext" mn:type="text" mn:default="I am a text" mn:label="Testo"/> <meta mn:param mn:name="myhtml" mn:type="html" mn:default="I am a <strong>html</strong>" mn:label="Content"/> |
mn:editable | Makes the objects with which it is associated editable. | <div mn:editable>This text is <strong>editable</strong></div> |
mn:editparam | Allows the content of editable text to be linked to a parameter (should be used when editable text is to be added with content saved on the database). | <span mn:editable mn:editparam="text"></span> |
mn:else | Applies a condition if the if and elseif conditions are not met. | <span mn:if="contact.stats.lasttags contains 'mylastTags'"> You clicked mylastTags</span> <span mn:else> You didn't click mylastTag </span> |
mn:elseif | Applies a condition if the if condition is not met. | <span mn:if="contact.stats.lasttags contains 'mylastTags'"> You clicked mylastTags</span> <span mn:elseif> You didn't click mylastTag </span> |
mn:enableactions | Enables the ability to trigger actions from a typedef. By default this parameter is false. |
<span mn:typedef mn:enableactions="true" mn:name="linkaction" mn:extends="link"> |
mn:extends | Allows you to create subtypes of an object. In this way, for the subtype, it will not be necessary to re-declare the parameters of the initial object. | <div mn:typedef mn:name="product" mn:label="Product">...</div> <div mn:typedef mn:name="productdiscount" mn:extends="product" mn:label="Discounted product">...<div> |
mn:feed | Allows you to create articles from RSS feeds. | <div mn:container mn:repeatable mn:type='article' mn:feed; |
mn:feedurl | Used with mn:feed it specifies its default URL. | <div mn:container mn:repeatable mn:type='article' mn:feed mn:feedurl='https://www.magnews.it/feed/'></div> |
mn:foreach | Allows cyclic and repeated insertion of content or articles. | <span mn:foreach='temp.prodotti' > <meta mn:param mn:name='title' > <meta mn:param mn:name='link' mn:type='url'> <meta mn:param mn:name='image' mn:type='image' > <h2>[param:title]</h2> <img src=[param:img] width=100> <a href='[param:link]'>landing page!</a> </span> |
mn:from | Sort a list of content based on a custom criteria. | |
mn:function | Allows you to call up a function. | <meta mn:tempvar mn:name="today" mn:function="setdatenow" /> |
mn:help | Allows you to add contextual help. | <meta mn:param mn:name="param1" mn:label="Param 1" mn:section="Section 1" mn:tab="Tab 1" mn:help="Explanation text" /> |
mn:hideable | Hides a portion of HTML. The ability to hide or show it can also be managed by interface. | <span mn:hideable>This text can be hidden</span> and this <span mn:editable mn:hideable>can be hidden and edited</span> |
mn:htmlversion | Checks whether you are viewing the HTML version of a communication. | |
mn:id | Assigns an Id to a content so as to ensure its uniqueness. | <div mn:editable mn:id="zone1">Zone with id zone1 (template1)</div> |
mn:if | Allows you to write conditions of type If. | <div mn:if="contact.values.SESSO eq 'M' and param.offer" style="background-color:#CCFFFF;">Special offer for men</div> |
mn:import | Allows you to import the content of a content template defined outside its context. | |
mn:importtarget | Defines where to insert the imported template. | |
mn:key | Defines a variable that can be translated into the language of the contact displaying it. | <meta mn:localize mn:key='hello' mn:ita='Ciao' mn:eng='Hello' mn:fra='Salut' /> |
mn:label | Allows you to associate a label (visible to users) with the content you are creating. | <div mn:typedef mn:name="article2" mn:label="Article with text "> |
mn:linkable | Prohibits applying (if false) a link on an image. By default its value is true. |
<img mn:editable width="100" height="100" mn:resize="false" mn:label="Logo" alt="Alternative text" mn:linkable="false"/> |
mn:list | Allows you to assign a name to a list. | |
mn:localize | Allows you to define variables that will be substituted depending on the language of the contact. | <meta mn:localize mn:key='hello' mn:ita='Ciao' mn:eng='Hello' mn:fra='Salut' /> [translate:hello] |
mn:max | Defines the maximum number of elements that can be added to a container. | <div mn:container mn:repeatable mn:min="2" mn:max="4"> |
mn:max-height | Allows you to indicate the maximum height of the image. If the image has been readjusted in width and exceeds the configured maximum limit, it will be cropped. | <img mn:editable width="100" mn:min-width="60" mn:min-height="60" mn:max-height="100" > |
mn:max-width | Readjusts the maximum width of the image to the configured value. | |
mn:min | Minimum number of objects that can be placed in a container. | <div mn:container mn:repeatable mn:min="2" mn:max="4"> <div mn:editable> This content can be repeated between 2 and 4 times </div> |
mn:min-height | Prevents the user from selecting too small a height value for an image. | <img mn:editable width="100" mn:min-width="60" mn:min-height="60" mn:max-height="100" > |
mn:min-width | Prevents the user from selecting an image narrower than the configured value. | <img mn:editable width="100" mn:min-width="60" mn:min-height="60" mn:max-height="100" > |
mn:name | Allows you to assign a name to a parameter. | <meta mn:param mn:name=" myparam"/> |
mn:noimport | By default, the images used are stored on the platform. This attribute applied to <img> tags, allows to force the non-importing of images. In addition, the attribute can be applied to <link> tags that reference an external CSS to not import the CSS into the template, thus leaving the tag untouched. | Example by tag <img>: <img mn:noimport src="myimageurl" > Example by tag <link>: <link mn:noimport rel="stylesheet" href="mycssurl" > |
mn:notrack | It prevents the tracking of a link, which in this way will not be considered in reporting. | <a href="http://doubleclick.com/pub/" mn:notrack>Do not track me</a> |
mn:onclickaction | Allows you to set the execution of a previously created action, upon user click. | <a mn:editable="" mn:onclickaction='nomeaction' target="blank">link that performs the action nomeaction</a> |
mn:onlyhtmlversion | Allows the content of the tag to be rendered only in the HTML version. | <span mn:onlyhtmlversion>This text does NOT show up in the automatically generated txt version</span> |
mn:orderby | Sort a set of objects according to a criterion. | <meta mn:listdef mn:name="mylist " mn:mode='query' mn:library='global' mn:contenttype='article' mn:max='10' mn:where="taglist like 'music'" mn:rendertype='myrendertype' mn:orderby="creationdate desc"/> |
mn:output | It is used to display an example instead of a parameter. | <meta mn:param mn:name="description" mn:type="text" mn:default="Lorem ipsum" /> <div><span mn:useparam="description">Lorem ipsum</span></div> <div><span mn:output="[param:description left='2']">Lorem ipsum</span></div> |
mn:panel | Lets you create a drag-and-drop type panel of objects that can be dragged and dropped into the platform workspace. | <div mn:typedef mn:name="myarticle" mn:label="My article" mn:extends="article" mn:panel > |
mn:panelorder | Allows the available objects to be arranged in a drag-and-drop type panel in an order. | |
mn:panelsection | Display a parameter in a specific section of a Drag-and-drop panel. | |
mn:param | Allows you to add a parameter. If the parameter is defined in the body then it will be valid for the entire document. If it is defined in the container then its validity will be limited to that container. | <div mn:container> <meta mn:param mn:name="Color" mn:type="color" mn:default="#E5E5E5" /> <meta mn:param mn:name="showtext" mn:type="boolean" mn:default="true" mn:tab="Options" mn:section="Visualization options" mn:label="Showing the text Goofy mn:help="E opzionale" > <div style="background-color:[param:color];"> Container with parameters<span mn:if="param.showtext">Goofy</span> </div> |
mn:rankedby | Sort the contents of a communication according to the contact's preferences. | <span mn:container mn:repeatable mn:rankedby='lasttags' mn:type='article' mn:from='5' mn:to='10' ></span> |
mn:repeatable | Allows the contents of a Container to be made repeatable. | <div mn:container mn:repeatable> |
mn:required | Makes a mandatory parameter. | <meta mn:param mn:name="param" mn:label="Param " mn:required /> |
mn:resize | Constrains default value. | <img mn:editable width="100" mn:resize="false"> |
mn:section | Show a parameter in a specific section of the interface. | <meta mn:param mn:name="param1" mn:label="Param 1" mn:section="Section 1" mn:tab="Tab 1" mn:help="Explenation test" /> |
mn:servicelink | It causes a link to be treated as a service link. | <a href="http://mysite.com/" mn:servicelink>Service link</a> |
mn:showafter | Used to define the order in which parameters are rendered. | |
mn:showbefore | Used to define the order in which parameters are rendered. | |
mn:showif | Conditions the visibility of some parameters to the value of others. | <meta mn:param mn:type="text" mn:name="text" mn:showif="param.option" mn:label="Text" /> |
mn:tab | Show a parameter in a specific tab. | <meta mn:param mn:name="param1" mn:label="Param 1" mn:section="Section 1" mn:tab="Tab 1" mn:help="Explenation text" /> |
mn:taglist | Pre-assigning tags to a link. | <a mn:editable href="http://www.magnews.it" mn:taglist="tag1,tag2">Link with mn:tag</a> |
mn:tempvar | Tempvar allows a value to be assigned to a variable (not a parameter). |
<meta mn:tempvar mn:name="mystring" mn:value="'Text'" mn:type="string"> To use the value of tempvar in an where: Variable: <meta mn:tempvar mn:name='name' mn:value='contact.values.name' /> Use of where: mn:where="'text' like @temp.nome" |
mn:thumbnail | Icon displayed in the designer in the content panel. | |
mn:to | In association with mn:from , it sorts a list of content based on a custom criterion. |
<span mn:container mn:repeatable mn:rankedby='lasttags' mn:type='article' mn:from='5' mn:to='10' ></span> |
mn:txtversion | Specifies what to show in the text version of the communication. | <span mn:txtversion>This text represents the automatically generated txt version</span> |
mn:type | Specifies the content type of a text object (whether text or html). | My name is <span mn:editable mn:type="text" mn:label="Your name">Insert here your name</span> |
mn:typedef | Defines a content type outside of a container. | <div mn:typedef mn:name="type1" mn:label="Tipo 1"> <meta mn:param mn:name="param1" mn:type="text"> This is type 1 with a parameter:[param:param1] </div> |
mn:useparam | It can be used to show an example value without using a specific parameter. | <span mn:useparam="description">Lorem ipsum</span> |
mn:userif | Allows you to create a custom visibility condition. | <div mn:userif="">The user can apply a condition on this text</div> |
mn:value | Assigns a value to a parameter. | <meta mn:tempvar mn:name="newprice" mn:value="param.price - param.price * param.discount /100" mn:type="int" > |