You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi guys.
I have multiple files inside ./views folder, _layout.html, view.html and search.html
in _layout.html I have {{template "PageCSS" .}} and in view.html and search.html I customized it by {{define "PageCSS"}}....{{end}}
and my go code is
but when I run it and go to search page I see view.html{{define "PageCSS"}}....{{end}} part
what should I do?
in fact it renders {{define "PageCSS"}}....{{end}} part of last .html file in ./views folder for all other .html files
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
hi guys.
I have multiple files inside
./views
folder,_layout.html
,view.html
andsearch.html
in
_layout.html
I have{{template "PageCSS" .}}
and inview.html
andsearch.html
I customized it by{{define "PageCSS"}}....{{end}}
and my go code is
but when I run it and go to search page I see
view.html
{{define "PageCSS"}}....{{end}}
partwhat should I do?
in fact it renders
{{define "PageCSS"}}....{{end}}
part of last.html
file in./views
folder for all other.html
filesBeta Was this translation helpful? Give feedback.
All reactions