Enhancement suggestion: Multiple instances of the same module
See original GitHub issueHello,
Not a bug but a feature suggestion, managing several pages (MMM-pages) on my magic mirror, I find the need to have a module behaving differently on the different pages (eg large display on the home screen, compact mode in another)
In the forums, a recurrent solution is to clone the modules to a different module directory with a different name, fiddle with the js/css file name and possibly other files depending on the module. Not really satisfactory as updating the module as it evolves becomes cumbersome.
I was thinking of something like
{
module: "text-clock-homescreen",
moduleOnFile: "MMM-text-clock",
position: "middle_center",
config: {
compact: false,
size: "large",
language: ['jp','fr','en','es'],
languageAlternationInterval: 10
}
},
{
module: "text-clock-compact",
moduleOnFile: "MMM-text-clock",
position: "top_center",
config: {
compact: true,
size: "medium",
language: ['jp','fr','en','es'],
languageAlternationInterval: 10
}
},
I haven’t looked at the internals of MagicMirror but just wanted to run this by the active community to see if this made sense at all to others or had already been considered and discarded.
Happy to contribute to this of course.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Thanks @michmich was right it work out of the box with classes in MMM-pages I’ve got it up and running now 😃
it really is up to the module to implement support for multiple instances. not hard, but does require some coding change