<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MMM-Remote-Control # More files *.html (pages)]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I have a small problem because I can’t load more links in the form * .html to the MMM-Remote-Control module. When I try to do my own thing, only the same page loads, and by going manually to others, the same page still loads, and the name in the address bar changes.</p>
<p dir="auto"><img src="https://i.imgur.com/J3TeOmE.jpg" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">This is what it looks like when trying to load the narzedzia.html page.<br />
(narzedzia - tools)<br />
It actually loads the lustro.html page<br />
(lustro - mirror)</p>
<p dir="auto">I did this:</p>
<pre><code>    getDom: function() {
        var wrapper = document.createElement("div");
        if (this.addresses.length === 0) {
            this.addresses = ["ip-of-your-mirror"];
        }
        wrapper.innerHTML = "http://" + this.addresses[0] + ":8080/index.html";
        wrapper.innerHTML = "http://" + this.addresses[0] + ":8080/lustro.html";
        wrapper.innerHTML = "http://" + this.addresses[0] + ":8080/narzedzia.html";
        wrapper.className = "normal xsmall";
        return wrapper;
    },
</code></pre>
<pre><code>            this.expressApp.get("/index.html", function(req, res) {
                if (self.template === "") {
                    res.send(503);
                } else {
                    res.contentType("text/html");
                    var transformedData = self.fillTemplates(self.template);
                    res.send(transformedData);
                }
            });
 
            this.expressApp.get("/lustro.html", function(req, res) {
                if (self.template === "") {
                    res.send(503);
                } else {
                    res.contentType("text/html");
                    var transformedData = self.fillTemplates(self.template);
                    res.send(transformedData);
                }
            });
 
            this.expressApp.get("/narzedzia.html", function(req, res) {
                if (self.template === "") {
                    res.send(503);
                } else {
                    res.contentType("text/html");
                    var transformedData = self.fillTemplates(self.template);
                    res.send(transformedData);
                }
            });
</code></pre>
<pre><code>            fs.readFile(path.resolve(__dirname + "/index.html"), function(err, data) {
                self.template = data.toString();
            });
 
            fs.readFile(path.resolve(__dirname + "/lustro.html"), function(err, data) {
                self.template = data.toString();
            });
 
            fs.readFile(path.resolve(__dirname + "/narzedzia.html"), function(err, data) {
                self.template = data.toString();
            });
</code></pre>
<p dir="auto">Unfortunately, I would like it to work properly as I would like. If someone can solve my problem, I can send something to paypal $$$.</p>
<p dir="auto">Thank you in advance for explaining how to do it correctly.</p>
]]></description><link>https://forum.magicmirror.builders/topic/11201/mmm-remote-control-more-files-html-pages</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 15:29:26 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/11201.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 22 Sep 2019 12:51:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MMM-Remote-Control # More files *.html (pages) on Mon, 23 Sep 2019 15:25:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ciastuus" aria-label="Profile: Ciastuus">@<bdi>Ciastuus</bdi></a> many html elements (p, div, span, … ) have an innerHtml attribute that will wrap text or raw html.</p>
<p dir="auto">a web page is made up of hundreds of html elements…</p>
<p dir="auto">the MagicMirror model is a single web page… and each module contributes a little bit of that content.</p>
<p dir="auto">the getDom() routine is MagicMirrors request to the module to supply the html for ITS content. (paragraph, table, … whatever)…</p>
<p dir="auto">BUT, until the getDom() routine returns, the stuff built is just in the modules memory space.</p>
<p dir="auto">the content provided to MagicMirror is then inserted into the dom in the appropriate location based on the ‘position’ you provided in config.js.</p>
<p dir="auto">the content can be built lots of different ways…</p>
<p dir="auto">hard coded html text (just like a html file)<br />
some hard coded and some built by building the little dom tree for the modules content<br />
or all apis…</p>
<p dir="auto">none of this is MagicMirror specific, as it uses the documented Document Object Model (dom) apis defined my the w3c standards.</p>
<p dir="auto">your module’s content starts with a</p>
<pre><code> &lt; div&gt;
     innerHtml is here
 &lt; /div&gt;
</code></pre>
<p dir="auto">and then u set its div.innerHtml, or call div.appendChild(anotherElement)</p>
]]></description><link>https://forum.magicmirror.builders/post/61551</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/61551</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Mon, 23 Sep 2019 15:25:58 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Remote-Control # More files *.html (pages) on Sun, 22 Sep 2019 19:08:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a></p>
<p dir="auto">Can you explain it to me with any example? I don’t understand JavaScript very well … Maybe you can give discord on priv?</p>
]]></description><link>https://forum.magicmirror.builders/post/61550</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/61550</guid><dc:creator><![CDATA[Ciastuus]]></dc:creator><pubDate>Sun, 22 Sep 2019 19:08:51 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Remote-Control # More files *.html (pages) on Sun, 22 Sep 2019 18:43:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ciastuus" aria-label="Profile: Ciastuus">@<bdi>Ciastuus</bdi></a></p>
<p dir="auto">no… you can only have ONE innerHtml per return…</p>
<p dir="auto">last one u did wins…</p>
<p dir="auto">if u need more info in the html, you will need to add multiple elements with the additional  html…</p>
<p dir="auto">if u did this manually, created a page to display ALL the html, what would it look like?<br />
what you do in MagicMirror is exactly the same</p>
]]></description><link>https://forum.magicmirror.builders/post/61547</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/61547</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 22 Sep 2019 18:43:42 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Remote-Control # More files *.html (pages) on Sun, 22 Sep 2019 16:48:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a></p>
<p dir="auto">So … After each wrapper.innerHTML I have to add</p>
<pre><code>return wrapper;
</code></pre>
<p dir="auto">e.g:</p>
<pre><code>wrapper.innerHTML = "http://" + this.addresses[0] + ":8080/index.html";
return wrapper;
wrapper.innerHTML = "http://" + this.addresses[0] + ":8080/lustro.html";
return wrapper;
wrapper.innerHTML = "http://" + this.addresses[0] + ":8080/narzedzia.html";
</code></pre>
<p dir="auto">Is that way?</p>
<pre><code>wrapper.innerHTML = "http://" + this.addresses[0] + ":8080/index.html";
wrapper.innerHTML = "http://" + this.addresses[0] + ":8080/lustro.html";
wrapper.innerHTML = "http://" + this.addresses[0] + ":8080/narzedzia.html";
return wrapper;
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/61543</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/61543</guid><dc:creator><![CDATA[Ciastuus]]></dc:creator><pubDate>Sun, 22 Sep 2019 16:48:45 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Remote-Control # More files *.html (pages) on Sun, 22 Sep 2019 14:16:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ciastuus" aria-label="Profile: Ciastuus">@<bdi>Ciastuus</bdi></a> said in <a href="/post/61537">MMM-Remote-Control # More files *.html (pages)</a>:</p>
<blockquote>
<pre><code>    wrapper.innerHTML = "http://" + this.addresses[0] + ":8080/index.html";
    wrapper.innerHTML = "http://" + this.addresses[0] + ":8080/lustro.html";
    wrapper.innerHTML = "http://" + this.addresses[0] + ":8080/narzedzia.html";
</code></pre>
</blockquote>
<p dir="auto">1st… the html is not processed until you return the whole html block to mm…</p>
<p dir="auto">return wrapper;</p>
<p dir="auto">second, you set innerHtml</p>
<blockquote>
<pre><code>    wrapper.innerHTML = "http://" + this.addresses[0] + ":8080/index.html";
</code></pre>
</blockquote>
<p dir="auto">then overwrote it</p>
<blockquote>
<pre><code>    wrapper.innerHTML = "http://" + this.addresses[0] + ":8080/lustro.html";
</code></pre>
</blockquote>
<p dir="auto">then overwrote it.</p>
<blockquote>
<pre><code>    wrapper.innerHTML = "http://" + this.addresses[0] + ":8080/narzedzia.html";
</code></pre>
</blockquote>
<p dir="auto">and then returned the html content</p>
<pre><code>        return wrapper;
</code></pre>
<p dir="auto">only the last</p>
<blockquote>
<pre><code>    wrapper.innerHTML =
</code></pre>
</blockquote>
<p dir="auto">should work</p>
]]></description><link>https://forum.magicmirror.builders/post/61538</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/61538</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 22 Sep 2019 14:16:28 GMT</pubDate></item></channel></rss>