MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

Adding duplicate Modules

  • Does anyone know how to add multiple iterations of the same module. E.g. if I wanted to show 3 city’s weather by using the same module 3 times with 3 different sets of data. Thank you!

  • Project Sponsor Module Developer


    You could try this. It doesn’t always work.

    1. Copy and paste the intended module folder twice so that you now have 3. ( example module - weatherforecast.

    2. Rename one of the copied folders to weatherforecast2. Then open that folder.

    3. Rename the weatherforecast.css file to weatherforecast2.css. Open that file.

    4. Rename all instances of .weatherforecast to weatherforecst2. Save and close.

    5. Rename the weatherforecast.js file to weatherforecast2.js. Open that file.

    6. Edit the Module.register line to weatherforecast2. Inside the quotes only!

    7. Edit the getStyles: function() return line to read "weather-icons.css", "weatherforecast2.css". Inside the quotes only! Save and close.

    Follow the above instructions again with the third folder, renaming, AS ABOVE, to weatherforecast3.

    Then you need a config.js entry for each module, using the names of the original and the 2 renamed modules.

Log in to reply