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-Modal

    Scheduled Pinned Locked Moved System
    modaldialogtouch controlvoice control
    14 Posts 5 Posters 5.8k Views 4 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.
    • strawberry 3.141S Offline
      strawberry 3.141 Project Sponsor Module Developer
      last edited by

      With MMM-ip another module has now integrated the modals. See the full list at https://github.com/fewieden/MMM-Modal/wiki/Depending-Modules

      Please create a github issue if you need help, so I can keep track

      1 Reply Last reply Reply Quote 0
      • strawberry 3.141S Offline
        strawberry 3.141 Project Sponsor Module Developer
        last edited by

        With MMM-soccer another module has now integrated the modals.

        Standings modal

        See the full list at https://github.com/fewieden/MMM-Modal/wiki/Depending-Modules

        Please create a github issue if you need help, so I can keep track

        1 Reply Last reply Reply Quote 0
        • ? Offline
          A Former User
          last edited by

          This post is deleted!
          S S strawberry 3.141S 3 Replies Last reply Reply Quote 0
          • S Offline
            sdetweil @Guest
            last edited by

            @hango said in MMM-Modal:

            template: “templates/MyModal.njk”,

            I think u need

            template: "../modulename/templates/MyModal.njk",
            

            to make it relative to your module
            instead of the modal module

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            ? 1 Reply Last reply Reply Quote 0
            • S Offline
              skuethe @Guest
              last edited by

              @hango said in MMM-Modal:

              I make my modal:

              this.sendNotification("OPEN_MODAL", {
              	template: "templates/MyModal.njk",
              	data: {
              		title: "Test modal",
              		message: "Test message"
              	},
              	options: {
              		isDialog: true
              	}
              });
              

              in console I get this:

              nunjucks.min.js:4 GET http://localhost:8081/modules//modal/templates/modal.njk?s=1634300311396 404 (Not Found)
              

              templates/MyModal.njk doesn’t really fit with the error message templates/modal.njk?! Sure you have specified the correct path?
              Referencing it to within your module path works just fine: template: "templates/MyModal.njk",

              If this is possible…

              That seems a bit rude. Just look at the linked modules in this thread which have this implemented successfully.

              1 Reply Last reply Reply Quote 0
              • ? Offline
                A Former User @sdetweil
                last edited by

                This post is deleted!
                S 1 Reply Last reply Reply Quote 0
                • ? Offline
                  A Former User
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @Guest
                    last edited by

                    @hango is a bug, doesn’t use the template name

                    edit the MMM-Modal.js , add the one line below after line 236

                                if (!sender) {
                                    modal = {
                                        identifier: this.identifier,
                                        senderName: this.name,
                                        template: 'templates/HelpModal.njk',
                                        data: this.voice,
                                        options: {}
                                    }
                                } else {
                                    modal.senderName = sender.name;
                                    modal.identifier = sender.identifier;
                                    modal.options = modal.options || {};
                                    modal.data = modal.data || {};
                                    modal.template:  modal.template || 'templates/HelpModal.njk',  // add this line
                                }
                    

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • strawberry 3.141S Offline
                      strawberry 3.141 Project Sponsor Module Developer @Guest
                      last edited by

                      @hango I responded with an MVP of a custom module using the modal in the related Github issue https://github.com/fewieden/MMM-Modal/issues/17

                      Please create a github issue if you need help, so I can keep track

                      1 Reply Last reply Reply Quote 0
                      • strawberry 3.141S Offline
                        strawberry 3.141 Project Sponsor Module Developer
                        last edited by

                        With MMM-NFL another module has now integrated the modals.

                        Statistic modal

                        See the full list at https://github.com/fewieden/MMM-Modal/wiki/Depending-Modules

                        Please create a github issue if you need help, so I can keep track

                        1 Reply Last reply Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • 1 / 1
                        • 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