@Render Decorator
This article requires knowledge of Controllers & HTTP Handlers
Main
In order to make an endpoint "renderable", it is necessary to decorate your HTTP Handler with the @Render
decorator. The @Render
decorator will tell Mandarine's MVC core that such endpoint is expecting to be rendered on the client's browser and thus Mandarine's MVC core will be expecting a renderable content.
Usage
Syntax:
See Mandarine.MandarineMVC.TemplateEngine.RenderingOptions
See Mandarine.MandarineMVC.TemplateEngine.Engines
template
Used to specify the path of your template inside your template's directory. This means, you must not specify the whole path as it will be resolved.
Used to specify the content of the template instead of using a file.
If a manual template is used, Mandarine.MandarineMVC.TemplateEngine.RenderingOptions.manual must be true
options
Used to specify the behavior of loading the template.
manual
If set to true, template is not considered a file but a string content.
engine
Engine to be used when rendering the template
Example
Last updated