-
Notifications
You must be signed in to change notification settings - Fork 36
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
How to pass current view context to child/include template #19
Comments
Why does it have to be valid go template syntax? These are jade templates, with go expressions. |
@hengestone @Joker Yesterday I learned to use this library and Jade/Pug syntax. My understanding is -
So I have tried given examples to see the behavior. As you know, In Go template we define -
Last night, I have tried further after submitting this issue and I was able to sorted out first 2 points and understood better. So we are good on first 2 points. Just updated this issue with strikethrough. However, issue no. 3 remains. If you have an understanding please guide me. Issue details: When we define |
May be I'm missing some piece of details to understand!!! |
This example: https://github.com/Joker/jade/tree/master/example/jade_extends produces go template with passing view context further. <!DOCTYPE html>
<html>
<head>
{{ block "title" . }}
<title>Default title</title>
{{ end }}
</head>
<body>
{{ block "content" . }}
{{ end }}
</body>
</html> This is suppose to happen for mixin too |
You haven't to do it now. |
@Joker I will give it try and get back to you. Thank you. |
@Joker I was trying your example program (https://github.com/Joker/jade/blob/master/example/jade.go) to see; how to integrate Jade library with aah framework.
I have observed following, please let me know. Am I understood correctly?
<title>{{ pageTitle }}</title>
is not valid go template syntax. Valid one is<title>{{ .pageTitle }}</title>
And if condition too{{ if youAreUsingJade }}
, valid one is{{ if .youAreUsingJade }}
. Basicallydot
is missing before variable{{ template "withGo" . }}
instead of{{ template "withGo" }}
Looking forward to your response.
The text was updated successfully, but these errors were encountered: