-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Provide method to add to template locals #42
Comments
Hi! The point of the rendering is to be independent of any interaction and creating side-effects from the request, thus why we do not provide the |
Hi, so the situation I'm in is, I need to get session information that is on the req object. In this instance, it's the current users username. |
Gotcha. So, to me, that sounds like what you really want is the ability to add information to the |
That could work as well. :) 👍 |
Cool :) So the interface I'm thinking of is the following: the provided The idea is that anything based on the request you would simply store in Then, especially once we start using a real template engine, it may be useful to provide Finally, all the properties that are in the |
@dougwilson Sorry never got back to you on this. Has there been any progress on adding this feature? Thanks. |
Hi @adrianbrowning, no, I don't think there has been any progress on this. If you were thinking someone else may drop in to do this, sorry, I didn't realize, and probably other passers by didn't either :) I'll add a help wanted label to this. |
Ah thank you @dougwilson |
Hey, would be great to have req and res added to the arguments passed back through, when using the template as a function.
So would look like:
The text was updated successfully, but these errors were encountered: