mirror of
https://github.com/kataras/iris.git
synced 2026-03-06 08:25:59 +00:00
Ability to register a view engine per group of routes or for the current a chain of handlers
Example at: https://github.com/kataras/iris/tree/master/_examples/view/context-view-engine
This commit is contained in:
12
_examples/view/context-view-engine/views/public/500.html
Normal file
12
_examples/view/context-view-engine/views/public/500.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!-- You can define more than one block.
|
||||
The default one is "content" which should be the main template's body.
|
||||
So, even if it's missing (see index.html), it's added automatically by the view engine.
|
||||
When you need to define more than one block, you have to be more specific:
|
||||
-->
|
||||
{{ define "content" }}
|
||||
<h1>Internal Server Error</h1>
|
||||
{{ end }}
|
||||
|
||||
{{ define "message" }}
|
||||
<p style="color:red;">{{.Message}}</p>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user