Read the statement by Michael Teeuw here.
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!
-
You could try this. It doesn’t always work.
-
Copy and paste the intended module folder twice so that you now have 3. ( example module - weatherforecast.
-
Rename one of the copied folders to weatherforecast2. Then open that folder.
-
Rename the weatherforecast.css file to weatherforecast2.css. Open that file.
-
Rename all instances of
.weatherforecasttoweatherforecst2. Save and close. -
Rename the weatherforecast.js file to weatherforecast2.js. Open that file.
-
Edit the Module.register line to
weatherforecast2. Inside the quotes only! -
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.
-
-
@Mykle1 one addition
if the module you are duplicating is one of the default modules, (located in the modules/defaults/ folder)
put the copy back into the modules folder…modules in the defaults folder get special treatment from a hard coded list
-
-
@Mykle1 u want speed or accuracy?! 😆
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login