- 313 new markdown files created - 30 relationships embedded - 313 entries indexed - State initialized with usage data
981 B
981 B
| id | type | title | tags | importance | confidence | created | updated | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 114955da-bfd6-4a78-9b89-736464bab91b | solution | Handlebars template variable resolution in Foundry VTT |
|
0.8 | 0.8 | 2025-12-14T00:35:20.242820+00:00 | 2025-12-14T00:35:20.242820+00:00 |
When passing data to Handlebars templates in Foundry VTT, using {{variableName}} can resolve to unexpected values if the template context includes objects (like actor) that have properties with the same name. The fix is to use {{this.variableName}} to explicitly reference the root template data context. This was discovered when difficulty showed 20 (from actor.system.skills.X.difficulty schema default) instead of the calculated value (18) that was correctly passed in templateData.difficulty. The console logs showed the correct value being passed, but the rendered HTML had the wrong value - a clear sign of Handlebars context resolution issues.