Named Macros Overview#

Named macros relate to two resources:

  • Site Defaults Doc

    These macros have a syntax is as in the following example:

    data.SiteDefaultsDoc.defaultcuchtmlnotificationtemplate

    Here the macro references an attribute of the specific Site Defaults Doc that is available at the hierarchy that the macro is called. In this case, the attribute name that is referenced, is defaultcuchtmlnotificationtemplate.

    The Site Defaults Doc template that is used to resolve to values in site specific Site Defaults Doc instances is only configurable by an administrator with the global administrator role. Other provider, and customer level administrators can modify the individual instances at the specific site, while administrators at a site level can only inspect the values.

  • Customizable Configuration Templates

    Administrators - typically at provider or customer level have a list of Configuration Templates available from the System Configuration menu. These can be modified and cloned to a required hierarchy if customization is needed. In these Configuration Templates, macros may be referenced.

    If the value to which a named macro resolves is required in a custom Configuration template, the named macro can then be added to the Configuration Template. Note however that Configuration Template customization involves more than the use of named macros.

The lists of named macros provides the macro name and its source code as reference. The macro name and the macro code which references to the Site Defaults Doc model attribute name describe its value in the Site Defaults Doc. No further explanation is needed in this case.

Where needed and the macro code is not self explanatory, a comment is added at the macro. Line breaks have been added to long macro source code strings.

The example below shows naming conventions, descriptions and line breaks.

  • macro.CUC_HTML_NotificationTemplateName

    {{ data.SiteDefaultsDoc.defaultcuchtmlnotificationtemplate
       | name:macro.DPSITE }}
    

    By default, the macro: DPSITE resolves to the site name at the current hierarchy, in other words: {{ data.BaseSiteDAT.SiteName }}

    The macro therefore resolves to the CUC notification template with the same name as the current site.