Read the statement by Michael Teeuw here.
MM2 with dynamic configuration and style
-
I think you could do the different layouts with MMM-Pages, for those modules that support using multiple instances.
but mm can only present one page at a time.
so I think the only way to do this is to run and instance per room, each on a different port
-
@sdetweil :
thank you very much for your fast reply,
The solution of an instance on different port for each room is good. but i m asking if there is another solution programmatically.
I know that we are only showing only 1 page at a time. but let me give you another example to simplify what i want. maybe this will help you to suggest another solution:
imagine that we will use this module MMM-RemoteCompliments which shows the content of a file on the linked google drive account. i will create a different google drive account for each room and i want to create a folder for each room that will contain the credentials, token, css for this room that will be used from this module to connect to the drive -
@mohamed-elleuch does that module support multiple instances running concurrently?
many modules do not. it takes extra care to.make it work.
I know what u want, but unless u change the core mm code, you can’t get it with the current implementation.
there is only one route / in server.js, you could edit and make more,
but there is no route prefixing, so you would have to do that too. etc etc.mm is a single page app. not a web site.
-
@sdetweil
Thank you very much for clarifying the situation.
So in this case i will run a separated instance for each room on a different port and then i will run a http server which will get the request from the browser and redirect to the convenient mm2 server by adding redirection conditions in the .htaccess file.The bowser will get the request let’s suppose on localhost and the result should be like the following:
hall: redirecting from http://localhost/hall => http://localhost:8080
bath: redirecting from http://localhost/bath => http://localhost:8081
room1: redirecting from http://localhost/room1 => http://localhost:8082
room2: redirecting from http://localhost/room2 => http://localhost:8083The whole situation is clear now, thank you for your help
-
@mohamed-elleuch i don’t know if you can hide the port number, after the redirect, and so, the value of the redirect is minimal… just use the port in the browser for each room and be done with it… (no one will see it but you)