mirror of
https://github.com/kataras/iris.git
synced 2025-12-23 21:07:03 +00:00
context.ViewData(key,value) and ViewLayout(layout) http://support.iris-go.com/d/27-using-middleware-to-inject-properties-for-templates/3
Nothing that you couldn't do before. Former-commit-id: 658ec25d8045d25a76f87c8f992e67e64006e287
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<h1>
|
||||
Title: {{.Title}}
|
||||
</h1>
|
||||
<h3>{{.BodyMessage}} </h3>
|
||||
|
||||
<hr/>
|
||||
|
||||
Current time: {{.CurrentTime}}
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>My WebsiteLayout</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- Render the current template here -->
|
||||
{{ yield }}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user