mirror of
https://github.com/kataras/iris.git
synced 2026-01-10 05:25:58 +00:00
builtin html template functions changes
This commit is contained in:
@@ -22,5 +22,8 @@ func index(ctx iris.Context) {
|
||||
// On Jet this is ignored: ctx.ViewLayout("layouts/main")
|
||||
// Layouts are only rendered from inside the index page itself
|
||||
// using the "extends" keyword.
|
||||
ctx.View("index", data)
|
||||
if err := ctx.View("index", data); err != nil {
|
||||
ctx.HTML("<h3>%s</h3>", err.Error())
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<title>{{.Title}}</title>
|
||||
</head>
|
||||
<body>
|
||||
{{ yield documentBody() }}
|
||||
{{ yield . documentBody() }}
|
||||
<footer>{{ include "../partials/footer.jet" . }}</footer>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user