Read the statement by Michael Teeuw here.
MMM-CalendarExt3 multiple instance display
-
I’ve been using this module for several months and love it. Now, after adding buttons that work with MMM-Carousel2 in slide mode, I would like to add a new instance of the calendar displaying the next month. I know that I need to add another instance in the config.js file, and change the instanceID of the new calendar to a different name and change the monthIndex to 1 so it will show the next month vice the current month. My question, is how do I call the different instance using carousel? Right now, I have “CURR_MONTH” on the first slide by simply calling “MMM-CalendarExt3” in the list for slide one. When I add the second instance (“NEXT_MONTH”) in the config file, how do I specify which instance to use on each slide?
-
@jlward73 carousel like pages documents using the module name. but the actual mechanism is using a classmame to search the MagicMirror page.
edit: i am wrong… carousel uses ONLY the NAME of the modulesso one can create an additional set of class
names for a module, using the
classes property after the module
property
see the doc here
https://docs.magicmirror.builders/modules/configuration.html#exampleMMM-Psges does the same thing
see the updated Readme on my fork, for the alternative approachhttps://github.com/sdetweil/MMM-pages
you can use the classes: property on one module and the module name for the rest
-
@jlward73
You can do it with only 1 instance by notification juggling.Tomorrow I’ll show you the example. (Of course you can swap 2 of instances also)PS.
Sorry. MMM-Carousel2 Doesn’t emit any notification to use. -
@MMRIZE
Sorry to pester you yet again, but after getting Journal just how I wanted, especially after you added the border around today (thank you), I’m trying to get multiple instances up on the screen. I’m starting by having only the basic calendar (with no listed position) and two instances of CX3 (current month and next month). I just want to get those on the same page. From there I want to feed it into Carousel, but I’m still trying to figure out how to “call” the right one. I’m assuming MMM-CalendarExt3{instanceID} where my two instances are labeled CURR_MONTH (monthIndex: 0) and NEXT_MONTH(monthIndex: 1). -
@jlward73 see my fork of MMM-Pages,
https://github.com/sdetweil/MMM-pagesonly the readme. for an alternate way to use both modules
pages and carousel.search for alternative approach
-
@MMRIZE
I was able to force it to work by re-naming the .js and .css files as seen in many posts. I also changed everything in the .css file from CX3 to CXN (for Next), and had to rename the popoverSupported and animationSupported constants at the beginning of the .js file. Maybe a little over the top, but it worked. I presume the smarter way would be to have a branch in github, but I haven’t started dabbling in that yet. -