Introduction
The Nfield templating system allows the users to extend the Default Template of the interviews with other templates and themes.
Custom templates can override totally or partially the default template. This means that, for example, if one view is not found on the custom template, the system will get the corresponding one from the default template.
The development of a template requires some knowledge on at least:
- Razor syntax
- ODIN Language
- Default template structure
- Models (Contracts) used in the views
Available helpers
This documentation site will focus on the last three.
Default considerations
Nfield templating uses different default considerations and rules both for the rendering of views and partial views.
View defaults:
Screen.cshtml is the base page: When performing an interview, the view that the interviewing system will return is "Screen", all the rest of the structure will be generated from there.
InterviewTemplate.cshtml is the base master page: Everytime the systems tries to find a view it will use that one as the default master page.
Partial view defaults:
- Appart of the hardcoded view names, the rendering of the partial views is based on the RenderPartialExtensions class, which will choose a view based on the Name of the model being rendered, and its attributes, like the DisplayHint or the RenderingDirective. All of this will be presented in the graphs shared in the next sections.