Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta tags #1

Closed
bodhi opened this issue Oct 21, 2016 · 4 comments
Closed

meta tags #1

bodhi opened this issue Oct 21, 2016 · 4 comments

Comments

@bodhi
Copy link
Member

bodhi commented Oct 21, 2016

how to support setting meta tags (eg. page title)

@sunfmin
Copy link
Contributor

sunfmin commented Oct 25, 2016

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>

@bodhi
Copy link
Member Author

bodhi commented Oct 27, 2016

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...

@sunfmin
Copy link
Contributor

sunfmin commented Oct 28, 2016

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.

@bodhi
Copy link
Member Author

bodhi commented Oct 28, 2016

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 ;)

@bodhi bodhi closed this as completed Oct 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants