Read the statement by Michael Teeuw here.
Collaboration of MMM-ProfileSwitcher and MMM-pages modules
-
@sdetweil
Thank you so much, but I didn’t fully understand where I need to specify['page1'] ['page2'] ['pagen']
and how do I link this definition to MMM-pages modules?
I realized that I define classes in the header of each module
module:'MMM-page-indicator', classes: 'default everyone',
Can you elaborate a little more on this or a link where you can read it.
-
@Kostosso i posted it
pages has a config option
modules: [ ]
which has the list of page configurations
-
setup your pages config as I had shown
only one classname in each ‘page’ definition, ‘page1’,‘page2’, etc
then go to a module definition
calendar
what pages do you want THIS instance to appear on
add those ‘page’ names to the classes list
repeat thru all the modules in config.
now profile is a DIFFERENT way of selecting modules
they take some logical profile name
by person
SAM
MARY
SUE
TOMso you would add THOSE profile name(maybe more than 1) to the modules you want shown of THAT person (or more)
suppose u want the family calendar to be shown for both mom and dad and they have profile names that way
you would add “mom dad” to the classes list for that calendar entry, but not for the kids profilesand then u would tell profile switch (via the notification), which PROFILE name to show modules for…
MagicMirror can only show or hide modules… everything in config.js is loaded EVERY time it starts up.
-
@sdetweil
How and where to use classes: I understood in modules.I read a lot of articles in the forum, but never our sample structure
modules:[
[ ‘page1’ ],
[‘page2’]
]
And how to apply it in practice, I did not find.Maybe there is a piece of the config file where it can be seen in detail (example).
:folded_hands: Thanks again for your help.
-
you won’t find this documented anywhere, its just my idea of making it all better
i took the sample config (config.js.sample)
and added mmm-pages
and used the sample mm-pages config (its only for a few modules) (from the readme.md)
mmm-pages added at the end…
only classes: added for the pages definedmodules: [ { module: "alert", }, { module: "updatenotification", position: "top_bar" }, { module: "clock", position: "top_left" }, { module: "calendar", header: "US Holidays", position: "top_left", classes:"page2" config: { calendars: [ { symbol: "calendar-check", url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics" } ] } }, { module: "compliments", position: "lower_third", classes:"page2" }, { module: "weather", position: "top_right", config: { weatherProvider: "openweathermap", type: "current", location: "New York", locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city apiKey: "YOUR_OPENWEATHER_API_KEY" } }, { module: "weather", position: "top_right", header: "Weather Forecast", config: { weatherProvider: "openweathermap", type: "forecast", location: "New York", locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city apiKey: "YOUR_OPENWEATHER_API_KEY" } }, { module: "newsfeed", position: "bottom_bar", classes:"page1", config: { feeds: [ { title: "New York Times", url: "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml" } ], showSourceTitle: true, showPublishDate: true, broadcastNewsFeeds: true, broadcastNewsUpdates: true } }, { module: 'MMM-pages', config: { modules: [ [ "page1"], [ "page2"] ], fixed: [ "clock", "weather", "MMM-page-indicator" ], // could have used 'fixed' as a classname here and add that to fixed modules hiddenPages: { // same here screensaver and admin classes "screenSaver": [ "clock", "MMM-SomeBackgroundImageModule" ], "admin": [ "MMM-ShowMeSystemStatsModule", "MMM-AnOnScreenMenuModule" ], }, } } ] };
-
:thumbs_up: Super! Issue closed!
THANK YOU SO MUCH!:handshake:
-