No it goes in library.js since it's a server side hook. And you need to add the corresponding entry in plugin.json.
// library.js myPlugin.filterMiddlewareRender = async (hookData) => { hookData.templateData.user = await user.getUserData(hookData.req.uid); return hookData; }; //plugin.json "hooks": { "filter:middleware.render": "filterMiddlewareRender" ... }Variables in widgets (html)
Solved
Technical Support
-
Yes it is possible, html widgets can access all the data available in ajaxify.data.
If you put
{description}
in the category header widget, it will display the description for that category.You can also add custom data via
filter:category.build
or any other build hook and that data will also be available for the html widget. -
Yes it is possible, html widgets can access all the data available in ajaxify.data.
If you put
{description}
in the category header widget, it will display the description for that category.You can also add custom data via
filter:category.build
or any other build hook and that data will also be available for the html widget.