Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Instances of Module #1

Open
jacobHclarkson opened this issue Mar 20, 2018 · 3 comments
Open

Multiple Instances of Module #1

jacobHclarkson opened this issue Mar 20, 2018 · 3 comments

Comments

@jacobHclarkson
Copy link

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?

@kjb085
Copy link
Owner

kjb085 commented Apr 7, 2018

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.

@jacobHclarkson
Copy link
Author

@kjb085 Thanks for the suggestion!

@WolfShadowheart
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants