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

✨feature: Pass all locals to ctx.Render #1693

Merged
merged 5 commits into from Jan 24, 2022

Conversation

kingdevnl
Copy link
Contributor

✨feature: Pass all locals to ctx.Render

This will by default pass all locals set user ctx.Local to the Template engine.

This could be usefull for setting variables using a middleware.

@welcome
Copy link

welcome bot commented Jan 7, 2022

Thanks for opening this pull request! 🎉 Please check out our contributing guidelines. If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

Copy link
Member

@ReneWerner87 ReneWerner87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a testcase and something in the documentation (https://github.com/gofiber/docs)

@kingdevnl kingdevnl marked this pull request as draft January 7, 2022 17:36
The option PassLocalsToViews is set to disabled by default
@kingdevnl kingdevnl marked this pull request as ready for review January 8, 2022 09:41
app.go Show resolved Hide resolved
ctx.go Outdated Show resolved Hide resolved
@ReneWerner87
Copy link
Member

@kingdevnl

@kingdevnl
Copy link
Contributor Author

Will have a look once I'm home, had quite a busy week so wasn't able to check it before

@ReneWerner87
Copy link
Member

thx

@ReneWerner87 ReneWerner87 merged commit 82d1039 into gofiber:master Jan 24, 2022
@welcome
Copy link

welcome bot commented Jan 24, 2022

Congrats on merging your first pull request! 🎉 We here at Fiber are proud of you! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants