mirror of
https://github.com/kataras/iris.git
synced 2026-01-17 00:45:55 +00:00
layout.html
<head>
{{ part "css" }}
</head>
home/index.html
{{ define "home/index-css"}}
<link rel="stylesheet" type="text/css" href="/public/css/home/index.css" />
{{ end }}
in html/temple the defined block is global variable, so the way of "{{ block "css" }}" in layout and "{{ define "css"}}{{end}}" in home/index.html and home/about.html just one definition work, others will be over coved。 No use!!!
This part function like extend the block in layout.
Former-commit-id: c3e26a8227808cf2d1dc7121bcffe1a98ce3e678
15 KiB
15 KiB