MMM-Reddit
MMM-Reddit copied to clipboard
Multiple Instances of Module
Is there a way to have multiple instances of the module with different parameters?
For example, image mode display of top content of a single subreddit, and then in a different position, top headlines from r/all?
This was something that I was thinking about prior to release. I plan on looking into this, but my inclination is that Magic Mirror may not support two of the same module.
Alternatively to a native MM solution, as a hack, what you can do is to duplicate the the MMM-Reddit directory and name the new directory MMM-Reddit2. Then inside of that directory rename MMM-Reddit.js to MMM-Reddit2.js and then inside of the file you just renamed on line 1 change MMM-Reddit to MMM-Reddit2. If it's not obvious by this point, this should give you another module that functions the exact same, but is named MMM-Reddit2.
@kjb085 Thanks for the suggestion!
Hey @kjb085, I managed to get both MMM-Reddit and MMM-Reddit2 to display both (I needed a restart before the images showed!), however I cannot get MMM-Reddit2 to rotate posts.
I'm working with displayType: 'image',
however the code is basically just copy pasted, so I'm wondering if you know if there's technical reason why?