We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Only works with default delims. Example doesn't work unless template uses "{{", "}}". Is there a way to get this to work?
import ( "github.com/gin-contrib/multitemplate" "github.com/gin-gonic/gin" ) type product struct { ID int `json:"id"` Name string `json:"name"` Price float32 `json:"price"` Color string `json:"color"` } func main() { r := gin.Default() r.Delims("[%", "%]") r.HTMLRender = loadTemplates() r.GET("/product", func(c *gin.Context) { data := product{ 4, "toy car", 12.40, "red", } c.HTML(200, "product", gin.H{"product": data}) }) r.Run(":3333") } func loadTemplates() multitemplate.Renderer { r := multitemplate.NewRenderer() r.AddFromFiles("product", "mytemplates/product.html") return r }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Only works with default delims. Example doesn't work unless template uses "{{", "}}". Is there a way to get this to work?
The text was updated successfully, but these errors were encountered: