ryan-d-williams / MMM-GoogleSheets

Google Sheets Module for MagicMirror
23 stars 2 forks source link

Multiple sheets with MMM-Pages #8

Closed gonzonia closed 3 years ago

gonzonia commented 3 years ago

I'm using Google Sheets to display my kids homework assignments from their classes. Unfortunately, every year they change the formatting. When it was just my one kid at this school I used to have code to scrape the various pages for the data. Then last year they were nice enough to use Google Calendars. Now, they seem to be all back to Google Docs but at least in a common format I can import into a Google Sheet. Each kid has a separate sheet and I'm rotating through various calendars, etc on the MagicMirror using MMM-Pages. I know how I can use multiple instances of the module to show the different sheets, but I'm not sure how (or if) I can use them in conjunction with MMM-Pages so that one sheet shows on one page and another sheet on a different page. MMM-Pages uses the module name and since both instances would have the same name, I'm not sure it will work. Here's how the MMM-CalendarExt2 handles it with notifications to give an idea of something that works.

gonzonia commented 3 years ago

Just as a note. I'm currently able to fit both sheets on the screen so when it loads the page it displays them both, but I could see a value in being able to page through multiple. Maybe I'm missing some way to "name" each instance of the module?

gonzonia commented 3 years ago

Since I'm here I'll add that I ended up making a duplicate copy of the module with a different name so that I could make this work. The teachers just couldn't keep their homework info in a nice small cell.

ryan-d-williams commented 3 years ago

@gonzonia thanks for the update.

Based on this forum post, it does seem that the only way to get multiple instances of the same module with MMM-Pages is to use a copy of the same module with a different name.

You can also check out this module: MMM-Page-Selector, which seems to allow a separate configuration for each module on the page so it may be what you need. I have not tried it myself to know for sure though.

I'm not sure if I could improve this module at all to prevent that, so I'm going to close this issue. Feel free to open it back up if you think there's a way I can improve this module to prevent this issue.

gonzonia commented 3 years ago

@ryan-d-williams Thanks for pointing me at MMM-Page-Selector. It took some fiddling but I was able to accomplish what I wanted.