Add option to pass additional parameters to the template
See original GitHub issueIt would be nice to have an option to add a method that wraps the data passed to the page-renderer, providing the req. Something to the effect of:
const errorDataHandler = (data, req) => {
data.body = req.body
data.redirectTo = req.host
}
await httpErrorPages.express(this.app, {
errorDataHandler,
lang: 'en_US',
footer: `hello <strong>world</strong>`,
})
I can include changes to express.js to demonstrate how I think this could work and provide that in a PR to be examined alongside this issue.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Tutorial - add parameters to template - Azure Resource Manager
Parameters let you customize the deployment by providing values that are tailored for a particular environment. You can pass different values, ...
Read more >Knockout 3.2.0 - Pass extra parameters within template
I want to use templates to make the view I'm working on cleaner. However, I can't make it, because at the moment I...
Read more >How to pass parameters to an item template implemented ...
The main idea of the approach I suggest is to add an additional parameter to the Form component and obtain it in the...
Read more >Create custom parameters for advanced tracking - Google Ads ...
Instructions for setting up custom parameters · Step 1: Choose a level · Step 2: Define your custom parameters · Step 3: Add...
Read more >Parameters - AWS Cloud Development Kit (AWS CDK) v2
AWS CloudFormation templates can contain parameters —custom values that are supplied at deployment time and incorporated into the template.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
the
req
andctx
variables can be exposed to thefilter
callback of v3@AndiDittrich Awesome, thank you so much, v3 is great! 🎉 👏 🎉