Read the statement by Michael Teeuw here.
MMM-Carousel; Two of the Same Module?
-
I am using the default Calendar module in my setup. I have two distinct entries in my config, one that shows my family calendar, and one that shows my calendar. Currently they are stacked on top of each other and both display one above the other.
I have started using MMM-Carousel to rotate modules through my display, and I’d like to show one of my calendars, and then rotate to the other.
Is there a way to reference one calendar module or the other, specifically?
-
@JeffreyDaro i don’t know carousel very well, but it uses module names as class names… you could give another class for an instance with the classes:“someodd_string”,
attribute on the module, and then use THAT string in the carousel config…I mostly use MMM-Pages, and i have documented another way to use it with the classes attribute, see the doc in my fork for the second method
https://github.com/sdetweil/MMM-pagesi think my ‘page1’,‘page2’ … approach will work the same with carousel…
-
@sdetweil, thank you…I will give that a try.
-
@JeffreyDaro That’s possible with MMM-Carousel. Look for
carouselId
in the README file :-) -
@KristjanESPERANTO Thank you for responding. I started working on the carouselID’s but I am struggling a bit to get that to work.
I was experimenting with both classes and carouselID:
{ module: "MMM-Carousel", position: "bottom_bar", // Required to draw in position config: { mode: "slides", ignoreModules: ["MMM-GooglePhotos"], transitionInterval: 40000, slideTransitionSpeed: 3000, slides: { main: ["clock", "weather"], "slide2": ["clock", "weather", "compliments"], "slide3": ["clock", "MMM-NFL"], "slide4": [{ name: "calendar", carouselId: "cal1", classes:"cal1" }, "MMM-NFL"], "slide5": [{ name: "calendar", carouselId: "cal2", classes: "cal2" }, "weather"] } } },
And as an example, my first calendar on the screen…
{ module: "calendar", carouselId: "cal1", classes: "cal1",
And my second…
{ module: "calendar", carouselId: "cal2", classes: "cal2",
-
@JeffreyDaro The carouselId has to be in the config part. Like this:
{ module: "calendar", position: "top_right", config: { carouselId: "cal1", ... } }, { module: "calendar", position: "top_right", config: { carouselId: "cal2", ... } },
-
Thank you! That was the issue. My eye did not catch that in the documentation. I appreciate your time and your patience.
JD.
-
Is there any functional difference between MMM-Pages and MMM-Carousel? I’m using Carousel, but just stumbled across Pages and am wondering if the grass is greener on that side…
-
@dathbe roughly the same . the buttons are a separate modules
and because it uses classes , the duplicates are easier
-
@dathbe I like the flexibility of pages, you can use the module classes: property
outside the module config for multiple instances of the same module
(and use the same value in custom.css selectors)I updated the doc on how to use a fixed page name structure
“page1”,
“page2”,
“page3”and use those values in the classes: of the modules you want to group together
I always had trouble remembering, is THIS module on page 2 or 3?
have to go back and look at the config(using module names)
and then back down, lose my place, repeatnow the module itself lists the page its on…
no id’s, no weird settings,my forks of pages, Carousel and ModulesGroupsRotation all provide a property to have different display times for different pages.
and the page name can be anything
Mom, Dad, joe, finance, power mgmt, … so it helps you organize the data (me at least)