• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-Page-Selector: A page switcher that can set positions of modules

Scheduled Pinned Locked Moved System
94 Posts 14 Posters 66.7k Views 15 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    Veldrovive Module Developer
    last edited by Dec 18, 2018, 7:52 AM

    @rudibarani,
    Ok, the development branch now has support for the new class name changes. When a module is shown on a page, it will be given the class page_{Current Page} and then the class will be removed when the module is hidden.

    R 1 Reply Last reply Feb 12, 2019, 10:16 AM Reply Quote 0
    • J Offline
      Johans @Veldrovive
      last edited by Dec 20, 2018, 8:07 PM

      @veldrovive
      Hi, just made a fresh install, and applied your module and MMM-Page-indicator.

      Pages are shown, but page indicator and newsfeed module are not on the screen.
      When I disbable MMM-Page-Selector, then Newsfeed & MMM-Page-indicator are visisble.

      As far as I understand, config is OK

      	modules: [
      		{
      			module: "alert",
      			pages: "all",
      		},
      		{
      			disabled: false,
      		        module: "MMM-Page-Selector",
      		        position: "top_bar",
      		        config: {
      			        defaultPage: "Page1",
      		                displayTitle: true,
      			        selectPageNotif: ["SELECT_PAGE"],
      		                incrementPageNotif: ["PAGE_UP"],
      		                decrementPageNotif: ["PAGE_DOWN"],
         			        autoChange: {
      				     	    interval: 100,    // Change page every 100 sec
      				            }
      		                   }
      		},		
      
      		{
      			module: "updatenotification",
      			position: "top_bar",
      			pages: {"Page1": "top_bar"},
      		},
      		{
      			module: "clock",
      			position: "top_left",
      			pages: {"Page1": "top_left", "Page2": "top_left", "Page3": "top_left", "Page4": "top_left"},
      
      		},
      		{
      			module: "compliments",
      			position: "lower_third",
      			pages: {"Page1": "lower_third", "Page2": "lower_third", "Page3": "lower_third", "Page4": "lower_third"},
      		},
      		{
      		        disabled: false,
      			module: "MMM-rain-forecast",
      			position: "top_right",   // see mirror setting for options
      			pages: {"Page1": "top_right"},
      			//header: "Regen Voorspelling", 
      			config: {   
      		                lat: 50.908529,
      		                lon: 3.965639,				
      				pleaseWait: "Wachten a.u.b",
      				noRainText: "Tot %s GEEN regen",
      				fillColour: '#0074d9'   // This is a blue color you can also use blue, cyan etc
      				}
      		},	
      
      		{
      			module: "newsfeed",
      			position: "bottom_bar",
      			pages: "all",
      			config: {
      				feeds: [
      					{
      						title: "New York Times",
      						url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
      					}
      				],
      				showSourceTitle: true,
      				showPublishDate: true
      			}
      		},
      		{
      			disabled: false,
      		        module: "MMM-page-indicator",
      		        position: "bottom_bar",
      			pages: "all",
      		        config: {
      		            //pages: 4,  // No need to set this
      		        }
      		},	
      		{
      			module: 'MMM-Cursor',
      			pages: "all",
      		},
      	]
      
      
      S 1 Reply Last reply Jul 17, 2019, 8:36 AM Reply Quote 0
      • V Offline
        Veldrovive Module Developer
        last edited by Dec 20, 2018, 8:20 PM

        @Johans,
        Ah, I believe the confusion comes from the fact that old discussions on this forum do not reflect the current functionality of the module. I try not to make any changes that break old config files, but one was necessary.
        In order to fix this config, you need to replace any instance of pages: "all" with pages: {"all": "some_position"}
        New versions don’t require you to have a position prop at all and you can just use the pages one.
        For more information, refer to the README.
        Hope this helps.

        J 1 Reply Last reply Dec 20, 2018, 9:10 PM Reply Quote 0
        • J Offline
          Johans @Veldrovive
          last edited by Dec 20, 2018, 9:10 PM

          @veldrovive said in MMM-Page-Selector: A page switcher that can set positions of modules:

          pages: {“all”: “some_position”}

          Thanks for the info, I should have read the README first. Sorry.

          1 Reply Last reply Reply Quote 0
          • R Offline
            rudibarani Project Sponsor @Veldrovive
            last edited by Feb 12, 2019, 10:16 AM

            @veldrovive
            Thanks again for implementing the current page as “dynamic” class. If I get it right, you had to code procedures to add and remove the page class when switching pages.

            Ok, the development branch now has support for the new class name changes. When a module is shown on a page, it will be given the class page_{Current Page} and then the class will be removed when the module is hidden.

            Would it be possible to make these procedures accessible via notifications? I am still looking for a way to add and remove classes based on external triggers. A scheme could be like this:

            Notification: "MMM_Page-Selector_Update_Class"
            Payload: {"add":["Module_1_Name:ClassA_to_add", "Module_2_Name:ClassB_to_add"], "remove":["Module_3_Name:ClassC_to_remove", "Module_4_Name:ClassD_to_remove"]}
            
            1 Reply Last reply Reply Quote 0
            • V Offline
              Veldrovive Module Developer
              last edited by Feb 14, 2019, 6:11 PM

              @rudibarani
              If I am understanding what you are asking for correctly, this function seems to be out of the scope that Page-Selector encompasses. I would develop a module to include this functionality, but I have been inactive in the world of Magic Mirror as of lately. As it stands, I would post this request to the module suggestions forum or ask somebody to include it in a module that has a closer association with this type of purpose. MMM-Remote-Control could be a good candidate.

              R 1 Reply Last reply Feb 17, 2019, 12:36 PM Reply Quote 0
              • R Offline
                rudibarani Project Sponsor @Veldrovive
                last edited by Feb 17, 2019, 12:36 PM

                @veldrovive
                OK - thanks for the reply anyway!

                S 1 Reply Last reply Jul 17, 2019, 2:57 AM Reply Quote 0
                • S Offline
                  smarthome @rudibarani
                  last edited by smarthome Jul 17, 2019, 2:57 AM Jul 17, 2019, 2:57 AM

                  Hi all

                  To make MMM-page-indicator work with MMM-Page-Selector, we must add MMM-page-indicator in to pages

                  {
                  			module: "MMM-page-indicator",
                  			position: "bottom_bar",
                  			"pages": {"Home": "bottom_bar", "News": "bottom_bar","Weather": "bottom_bar","Entertaiment": "bottom_bar","Smarthome": "bottom_bar","System": "bottom_bar"},	
                            	config: {
                  			pages: 6,
                  			}
                  		},
                  
                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    smarthome @Johans
                    last edited by smarthome Jul 17, 2019, 8:37 AM Jul 17, 2019, 8:36 AM

                    @Johans

                    pages: "all",
                    

                    You forgot the quotation mark before and after pages

                    "pages": "all",
                    
                    
                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      Brandenborg
                      last edited by Oct 12, 2019, 3:15 PM

                      I love this module especially in use together with the MMM-navbar.
                      Is there any config using existing code that will let me make it return me to “default” page after a given period of time after changing page?

                      V 1 Reply Last reply Oct 12, 2019, 8:26 PM Reply Quote 0
                      • 1
                      • 2
                      • 6
                      • 7
                      • 8
                      • 9
                      • 10
                      • 8 / 10
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy