Copy link to clipboard
Copied
Currently module_json unlike a lot of the other module tag can't have a custom tag as it just refuses to render.
i.e This works:
{module_json, json="/cricket/teams.json" template="/Templates/scores.tpl"}
Is this a bug? As I would recommend that the ability to pass other params though.
The concept would be that you can push "state" into the template: "/Templates/scores.tpl"
{module_json, json="/cricket/teams.json" template="/Templates/scores.tpl" activeTeam="Australia"}
This would allow custom logic to be encapsulated inside the rendered template.
Hi jnowland,
Unlike other classic BC modules which use related data in our back-end database, {module_json} uses a custom JSON file as its data source and displays it according to a template file.
{module_json} fails to interpret params other than json= "" & template= "" as, other params are not defined in the system for this module hence, i would consider inclusion of other parameters as an enhancement rather than a Bug.
Alternatively, custom logic on desired Key can be defined in the template f
...Copy link to clipboard
Copied
Hi jnowland,
Unlike other classic BC modules which use related data in our back-end database, {module_json} uses a custom JSON file as its data source and displays it according to a template file.
{module_json} fails to interpret params other than json= "" & template= "" as, other params are not defined in the system for this module hence, i would consider inclusion of other parameters as an enhancement rather than a Bug.
Alternatively, custom logic on desired Key can be defined in the template file.
For instance on this test page a custom message is being shown when defined condition is met for "activeTeam" Key: Link to page
Hope that helps !!
Regards,
Himanshu.
Copy link to clipboard
Copied
In summary - Not a bug.
It is a data file. You can pass as a collection as well if you need to combine other data.
Copy link to clipboard
Copied
Thank Himanshu for explaining the reasoning behind this decision. An "enhancement" is a more accurate description.
Copy link to clipboard
Copied
You are welcome, jnowland. I am glad that i was able to assist.
Please feel free to contact us for any further help or info
Regards,
Himanshu.