Closed bodhi closed 7 years ago
implement a layout for page just like containers, but comply Layout interface:
func MainLayout(r *http.Request, body string) (html string, err error) {
html = LayoutTemplate(body)
return
}
@{
import (
)
var body string
}
<html>
<head>Containers Example</head>
<body>
@raw(body)
</body>
</html>
The problem is more: can a container affect the content outside of itself. It could be done via the request context, but this becomes hidden logic...
No, container shouldn't affect anything outside of containers, If you want to effect layout Or many containers. You should write a middleware to setup things in Context, and config the middleware for those pages who depends on it.
No, container shouldn't affect anything outside of containers
Seems reasonable to me. It's kinda related to #11 where you do want to affect containers ;)
how to support setting meta tags (eg. page title)