This Management subsection is the core of the Document Manager. It allows for the creation of various document types, depending on the business need, by using a MJML code and custom templates.
The entire subsection is divided in two parts: Appearances and Templates.
Note: The subsection Document Templates under the Management category in the Billia Management Panel is designed the same way as the subsection Email Templates.
This part of Document Templates contains guidelines for the Appearance of the document, i.e. sets the header and/or footer for the document, how they look, the size and shape of the font, the logo, etc. This is done by using the MJML language. Additionally, the specific data for the Appearance, content such as city, VAT, company name, etc., is generated through the Vocabulary section. For more information, please see the respective article.
Multiple Appearances can be created. Each one is a "guideline container" for the finished outlook of a generated document.
The list previews Appearances with their respective unique ID, title, and modification tools. Clicking on the ID enables the Appearance for editing.
|Edit||- Edit the Appearance, same could be done by clicking on the ID.|
|Delete||- Delete the Appearance.|
|Add new||- Create a new Appearance.|
Note: The system converts the MJML data to HTML and stores it. Completing the edit of an already exiting Appearance will prompt the system to ask whether it should rebuild all documents already using that Appearance. Choosing "yes" will reformat all documents, choosing "no" will just save the Appearance modifications without reformatting any previous files. Still, all following documents using that Appearance will be generated with the last changes made.
Creating a new Appearance requires to complete certain fields:
|Appearance name||- Set the title for the Appearance. This way when multiple Appearances are present, the Admin can differentiate them by purpose.|
|MJML||- The MJML code for the appearance design/style is written here.|
|Preview||- Choose an already existing template from the drop-down list to see a preview of that appearance.|
For optimum convenience, the system has an embedded MJML checker on the page. When the MJML code above is incorrect in any way, it will display an "Error parsing MJML" message.
Note: When choosing to create a new Appearance, the Create Appearance page shows up blank, which automatically prompts the Error checker to display an MJML error. This is the default behavior of the Error checker and is caused by the MJML field being blank.
|Default||- Allows for one Appearance to become a default choice for any document templates that don't have a specific Appearance attached to them.|
|Beautify||- In case it is needed, clicking this button will arrange to MJML properly.|
|Save||- Save the appearance at its current state.|
Note: The Beautify button cannot fix errors in the MJML, it can only fix the arrangement of the rows and spaces, so that the code is more easily readable.
The Templates section sets and manages all document templates. The templates represent the actual content of the document files.
The list displays the Templates with the option to be edited and expanded for details.
|Search||- Search through templates per key word.|
|Edit||- Edit the template.|
|Expand||- Expand the template for further details.|
|Add new||- Create a new template.|
Each template can be expanded to view more information about it. It also shows more available Admin actions.
Depending on the integrated languages in the system, each template can be created in more than one language. The expanded preview will show the template in all languages it has been generated. It will also display its Appearance, notification type, and the date of creation.
|Edit||- Edit the template in the specific language. This will open the template's editing page on that specific language. The same action can be prompted by also clicking on that template's ID or title.|
|Delete||- Delete that specific language template.|
|Example data||- Click to see an example of the type of information and order it would be set.|
Clicking on the Example data button will provide examples on the type and structure of the information provided. This option is divided in two panels - Preview and Edit.
The Preview panel visualizes the information in a JSON format, where there are strings (in red) and integers and floats (in blue).
The Edit panel visualized the information as available for modification in cases where the Example needs to be updated.
Note: The Example data cannot be deleted or removed. The only workaround is to leave it blank.
|Expand line||- Click to show subrows and more information.|
|Hide details||- Click to hide subrows.|
|Save||- Save changes.|
Adding a new template and editing an already existing one require the completion of the same fields. It is again based on the MJML language and works together with an Appearance. Each template can be created in as many languages as there are set in the system. On the top of the page there is a separated sub-panel for each language.
The example screenshot below shows three available languages - Bulgarian, French and English.
|Name||- Set the name for the template. This will be visible in the list of templates and dropdown template sections in order to differentiate between them.|
|Title||- This refers to each language selection. Here, the respective short explanation for this template in the respectively selected language is set. The title will be visible in the Management Panel list of templates details and the Filter menu in the Documents archive.|
|Appearance||- From this dropdown menu is where an Appearance is set for the template. In order for this to be done, the Appearance needs to be already created.|
|MJML||- Type in the MJML code to shape the template.|
|Preview||- Displays a whole preview of the template with the selected template embedded.|
|Expand more data||- Clicking this will expand a side panel with more information on Variables and Functions.|
|Beautify||- Will fix the rows arrangement of the MJML.|
|Save||- Save changes made to the template.|