Creating a Template

Creating a Template

The definition of a template is a concept created to set how each content will appear on the interfaces.

A subfolder should be created in the GUI\Custom\ES\Template folder with the name to be specified for Template and a file named Default.html should be placed in it.

Template selection methods

  •  Template=<TemplateFolderName> can be passed through the url. The value transmitted will be stored in the browser.

  • By adding under GenericSettings in project settings

    •  The default Template can be specified on a project basis by the definition: "Template":"<TemplateFolderName>"

    •  The Template concept can be turned off by the definition: "DisableTemplate":true

    • You can define a single mandatory Template that can be used in a project by the definition: "ForceTemplate":"<TemplateFolderName>". When this definition is made, all other Template determination methods are ignored.

  • The "Template":"<TemplateFolderName>" definition to be added under SystemJSONSettings can specify the default Template for all projects.

 

A value of "none" means that a Template is not selected.

 

Definitions and Examples

 

Default.html can contain dece-template in the same way as described in Displaying Template search results , or it can contain special methods explained in the same address or in other documents. A Template should just change the document view and it should not interfere with other fields on the pages. Colors, Theme, Order is a Layout topic.

Html CSS can contain script definition. It can load another CSS or script.

"dece-template" id values and functions that can be included in the Default.html

  • geodi-template-default : Used to change the appearance of a single content on the DLV home screen.

  • geodi-template: Used to change the appearance of a single content on the screen in vertical lists.

  • geodi-template-hor : Used to change the appearance of a single content on the screen in horizontal lists.

  • geodi-container-template-default: Used to change the appearance of the Content and the entire list on the DLV main screen.

  • geodi-container-template:  It is used to change the appearance of the content and the entire list in vertical lists.

  • geodi-container-template-hor:  It is used to change the appearance of the content and the entire list in horizontal lists.

Click here for an example interface where you can try to edit a template.

Example Default.html content
<script type="dece-template" id=geodi-template-default > <div class="DocAll" {{ data.GetDocItemAttr() }}> <h1><a {{ data.GetHrefFull() }}> {{ data.DisplayName }} </a> - {{ data.AdditionalValues.Date }} </h1> <span class="SummaryText __textclass geodiFormatable" contentid="{{data.ContentIdentifier}}">{{data.Summary}}</span> </div> </script>