DALIM DOCUMENTATION

Declaration file

Written by Aurelien Knapp | Aug 25, 2023 2:04:06 PM

Requirements

The following rules must be fulfilled to make the plugin load correctly:

  • The plugin directory MUST contain an escmp.xml file
  • This file MUST be valid XML
  • This file MUST contain ONLY ONE root tag of the type <es-plugin>
  • This tag MUST have the name attribute declared
  • The name attribute's value MUST be unique among all the other plugins.

If any of these rules are not scrupulously respected, the system won't be able to load the plugin.


Attributes

Here is the list of the supported attributes on the <es-plugin> root element.

name

This attribute is MANDATORY and MUST BE UNIQUE among the plugins, and the system will refer to this plugin with this value.

mainFile

Default value <name of the plugin>.js

This attribute will refer to the main JavaScript file that will be loaded and executed to build and manage the plugin.

layoutUsage

Default value [ ]

This attribute holds the comma-separated list of the templates in the main ES layout from which the plugin is accessible. If the attribute is absent or empty, the plugin will have no layout usage.

The list must consist of one or more of the following values:

PageOrder, Job, Customer, Feed, Upload, Approval, Rejection, Workflow, JobVariant, Section, Folder, Form, Desktop

smartviewUsage

Default value [ ]
This attribute holds the comma-separated list of the templates in the ES Desktop layout from which the plugin is accessible. The plugin will have no smart view usage if the attribute is absent or empty.
The list must consist of one or more of the following values:

PageOrder, Job, Section, Statistic, Form

properties

Default value [ ]

This attribute holds the comma-separated list of properties the plugin will handle. These data are contextual from where the user locates in ES. Example: ID, LongComment, MetaData/:<Prefix>/<Key>

 

Child elements

Here is the list of supported child elements for the <es-plugin> element.

 

javascript

The javascript tag is used to load extra dependencies for the plugin. Those dependencies are loaded before appending them to the plugin and in the <head> section of the document. If more than one javascript tag is declared, the scripts will load in the order of their declaration.

 Syntax 


<javascript src="my_dependency.js" />

 Attributes 

src

The src attribute indicates the file's path to load in relation to the escmp.xml file location. If the src attribute is missing, the javascript tag will be ignored. If multiple tags refer to the same src, the script will only be loaded once.

Use the javascript tag with caution as dependencies may affect the behavior of the system or of the other plugins.

 Examples 


<es-plugin
    name="myPlugin">
    <javascript src="my_dependency.js" />
</es-plugin>

css

The css tag is used to load additional styles for the plugin. Those stylesheets are loaded before the plugin and are appended in the <head> section of the document. If more than one css tag is declared, the stylesheets are loaded in the order of their declaration.

 Syntax 


<css src="my_style.css" />

 Attributes 

src

The src attribute indicates the file's path to load in relation to the escmp.xml file location. If the src attribute is missing, the css tag will be ignored. The stylesheet will only be loaded once if multiple tags refer to the same src.

 Examples 


<es-plugin
    name="myPlugin">
    <css src="my_style.css" />
</es-plugin>

 

resource

The resource tag is used to declare the files allowed to be served by the system.

 Syntax 


<resource name="image1.jpg" mimeType="image/jpeg" />

 Attributes 

name
The src attribute indicates the file's path to load in relation to the escmp.xml file location. The resource tag will be ignored if the name attribute is missing or the path doesn't exist.

mimeType
The mime type of the file. The resource tag will be ignored if the mimeType attribute is missing or if its value is invalid.

 Examples 


<es-plugin
    name="myPlugin">
    <resource name="image1.jpg" mimeType="image/jpeg" />
</es-plugin>