1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-13 12:10:40 +00:00
This commit is contained in:
Ming Deng
2020-08-05 06:34:54 +00:00
parent 6c6cf91741
commit 261b704d8b
15 changed files with 19 additions and 334 deletions

View File

@ -0,0 +1,3 @@
{{define "block"}}
<h1>Hello, blocks!</h1>
{{end}}

3
test/views/header.tpl Normal file
View File

@ -0,0 +1,3 @@
{{define "header"}}
<h1>Hello, astaxie!</h1>
{{end}}

15
test/views/index.tpl Normal file
View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<title>beego welcome template</title>
</head>
<body>
{{template "block"}}
{{template "header"}}
{{template "blocks/block.tpl"}}
<h2>{{ .Title }}</h2>
<p> This is SomeVar: {{ .SomeVar }}</p>
</body>
</html>