Passing extra variables to ad.html and consent.html: 2pts
See original GitHub issueIt is often useful to pass extra variables to ad.html or consent.html, however this ability is not currently provided by Dallinger. The “/ad” route is long and complex, and finishes like this:
return render_template(
"ad.html",
recruiter=recruiter_name,
hitid=hit_id,
assignmentid=assignment_id,
workerid=worker_id,
mode=config.get("mode"),
app_id=app_id,
)
We would like to be able to inject extra variables into this render_template
call, with these variables being defined as a class attribute on the Experiment class (see extra_files
for a similar approach. Likewise, we would like to be able to inject extra variables into the render_template
call for consent.html.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Pass a Variable Value from One HTML Page to Another
Source code: https://openjavascript.info/2022/06/09/ pass -data-from-one- html -page-to-another/⚡ Looking for high-performance, affordable web ...
Read more >How do I pass custom data and variables into the ad?
You can pass a custom value into the ad tag and our ad server will pass that same value along to the actual...
Read more >Passing a variable from node.js to html - Stack Overflow
To pass variables from node.js to html by using the res.render() method. Example:
Read more >Using dynamic ad variables in AWS Elemental MediaTailor
Passing parameters to the ADS In the URL, include static parameters and include placeholders for dynamic parameters. Enter your template URL in the ......
Read more >Passing information to HTML ad | Support
Another way to access is to mark in your HTML code the variables via macros so that they will be passed on. PS:...
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 FreeTop 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
Top GitHub Comments
Thanks for checking, @jessesnyder! I agree, guess that’s it then 😃 Although, I still agree with @alecpm that it would be worth documenting if it’s not documented already.
A
@property
decorator seems to work fine, so it sounds like we can close this issue(?)Experiment class:
Template:
Output: