In order to improve the usability of my page system, I would like to be able to use a custom piece of information in the config file to define pages and positions for the Modules.
{
"module": "clock",
"position": "top_right",
"pages": {"pageName": "position"},
"config": {}
}
However, it seems just using getModules.enumerate() doesn’t supply that new pages object.
As a workaround, I noticed that the config for each module is given and so the page’s object could be stored inside that. However, for less confusing use, I would rather have it outside.
The other option I would explore is simply importing the config into my node_helper and then parsing the config manually, but before I went ahead with the plan I wanted to see if there is some reason to refrain from that.
Is there a correct way to do this? Is it correct to do this at all?