Templates

Every content in Relatude can be associated with a template. You specify the template in the options tab in the UI or the "ContentBase.TemplateId" property in code. The TemplateId is simply the Node Id of the actual template. 

Each template is restricted to a set of content classes, this is defined in the Template module. If only one template is associated with the content class of a new content instance, then the template Id will be set automatically on the new content. You can also set the default template for each class in the Ontology module, under the class settings. The setting is called "Default Template Id". 

Each template is associated with a stylesheet. This association is use to specify which stylesheet should be used by the HTML editor when a user is editing a content. The system will look at the template the content is using and at the stylesheet the template is associated with. It will then inject the styles found in this stylesheet into the HTML editor. You are not required to set up the association, but it will help to make the appearance of content in the HTML editor to match the appearance of content rendered in the page view.

MVC templates

MVC templates are different and refer to MVC Routes. With MVC, the url rewrite is left to the MVC framework. The MVC template in Relatude simply defines which route is associated with a content and specifies how Relatude should construct the URL of a content, and how Relatude should associate a request to a Relatude content.