Skip to content
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

💡 Template / View / Render enhancement #277

Closed
pharrisee opened this issue Apr 19, 2020 · 3 comments
Closed

💡 Template / View / Render enhancement #277

pharrisee opened this issue Apr 19, 2020 · 3 comments
Assignees

Comments

@pharrisee
Copy link

pharrisee commented Apr 19, 2020

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?

@welcome
Copy link

welcome bot commented Apr 19, 2020

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

@Fenny
Copy link
Member

Fenny commented Apr 19, 2020

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 Fenny changed the title 🔥 creating a middleware which passes template names rather than raw content 💡 Template / View / Render enhancement Apr 25, 2020
@Fenny
Copy link
Member

Fenny commented Apr 30, 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

@Fenny Fenny closed this as completed Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants