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
Loving fiber so far, but I have one issue with the way that templating is done.
The current templating functionality is passing the raw contents of the template.
I generally use https://github.com/unrolled/render for template management, and it works really well in other Go web frameworks/routers. However it requires the template name and not the contents to be passed to it.
I wrote a middleware to the templating interface (as the others already implemented do), but obviously it's not worked for the reason specified above.
Is there any way to get the templating engine to pass the name of the template rather than it's contents?
The text was updated successfully, but these errors were encountered:
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you want to chat with us or need help, join us on our Discord server: https://gofiber.io/discord
Hey @pharrisee, our templating middleware was a quick-fix solution. You could play with the template repo and submit a PR.
Or leave a code suggestion regarding our template middleware here.
Fenny
changed the title
🔥 creating a middleware which passes template names rather than raw content
💡 Template / View / Render enhancement
Apr 25, 2020
@pharrisee We are going to change the way we render templates in Fiber. I opened an discussion that relates to multiple issues including this one, if you have any ideas or feedback please post them here #331
Loving fiber so far, but I have one issue with the way that templating is done.
The current templating functionality is passing the raw contents of the template.
I generally use https://github.com/unrolled/render for template management, and it works really well in other Go web frameworks/routers. However it requires the template name and not the contents to be passed to it.
I wrote a middleware to the templating interface (as the others already implemented do), but obviously it's not worked for the reason specified above.
Is there any way to get the templating engine to pass the name of the template rather than it's contents?
The text was updated successfully, but these errors were encountered: