-
Notifications
You must be signed in to change notification settings - Fork 37
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
Issue when using on Gin Framework #11
Comments
You need at reader page define content like this: {{define "content"}}
<h1 class="hello">This is content!!!!</h1>
<p>123 + 333 = {{call $.add 123 333}}</p>
<hr>
<p><a href="/page">Page render</a></p>
{{end}} See the example: https://github.com/foolin/goview/blob/master/_examples/gin/views/index.html |
Should not it be better to not throw exception and skip those if not provided in child file like index.html |
Use {{block "content" .}}Default Content{{end}} |
Thanks! will try it out. |
Thanks! it's working now... but now having some issue with embeding css/js/images. My folder structure is:
I've tried following code to link template and CSS/JS/IMAGES inside public folder usin go rice.
I tried to run above query but unable to link CSS file in template
|
Modify to http.StripPrefix("/pbc", http.FileServer(box.HTTPBox()))
The link is:
|
I'm trying to use goview on Gin Framework.
I did following from one of the example:
master.html:
But when trying to access the page, I stumbled with following error:
Shouldn't it work even though
template "content" .
existsThe text was updated successfully, but these errors were encountered: