Hello,
I would like to access variables from a global module in others modules in my templates.
In this global modules, I’m getting value from a HubDB row like this:
{% set formation_date_text = module.hubdbrow_field.columns.date_text %}
In another module, I want to display this variable like this:
{{ formation_date_text }}
This in not working. What is the process to make this happening ?
Tx,
Hi @MPirnay
Currently, it is not possible to use the variable of a module in a different module.
Thanks!
Hi @MPirnay,
you could create a module with all of your settings, and use export_to_template_context. Implement the module in a template and you can access all the settings from within the module.
Tipp: Erin Wiggers talks about this in the lates Developer-HUG
hope that helps
best,
Anton