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 @billizzard, actually this is not a bug, this is how Go HTML templates work. If you parse more than one template with the same {{ define }}, the one overrides the other, you can read it at: https://stackoverflow.com/questions/66613213/rendering-golang-template-defining-the-same-block-multiple-times. For that reason we have two features: the custom {{ yield . }}, however in your case that's not what you need, the 2nd one is the Blocks template engine which uses similar solution (map/set of templates) and supports multiple {{define}} tags.
I have main layout
stucture public/html folder
layout/main.html has this code (this is main layout)
There are also pages that are rendered like this (routes different)
ctx.View("files/list.html");
ctx.View("menu/menu.html");
files/list.html content
menu/menu.html content
no matter which page of these two you go to, it’s always 111 in title, but expect 222 in list.html page
The text was updated successfully, but these errors were encountered: