Multiple pages mod

Post Reply
davidefa
Expert
Expert
Posts: 905
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Multiple pages mod

Post by davidefa » Sun Oct 15, 2023 10:01 pm

In Meteotemplate you can only configure a single ( home ) page.
With this mod you can add as many ( configurable ) pages as you want to your meteotemplate site.
In this way you are not obliged to create a kilometric home page, very long to scroll ( and also very slow to load ), but you can divide it in a few pages.

How does this work?
- simply create an homepage layout ( via the meteotemplate control panel ) and save it with a name ( short name, max 8 chars ), for example 'page2' ( you can create as many as you want ), meteotemplate already does this
- the mod extends the indexDesktop.php scripts ( used to load the home page ) so that you can pass a 'layout' parameter to load one of the layout created in previously ( not only the default one )
- to load the page2 layout, for example, point your browser to ( note the .txt added after the layout name ):

Code: Select all

indexDesktop.php?layout=page2.txt&nonewpage
- the additional parameter '&nonewpage' is an addition to the meteotemplate menù to open the page in the current tab ( default behaviour is open in a new tab, which is annoying in this case )

Installation
Simply unzip the archive in the root directory of the meteotemplate installation ( it will overwrite the files with the same name ). It is compatible with meteotemplate 18.0 and 19.0


site
multipage01.png
multipage01.png (911 KiB) Viewed 11184 times
Attachments
multiplePage_0.1.zip
(17.07 KiB) Downloaded 502 times
Last edited by davidefa on Mon Oct 16, 2023 4:37 pm, edited 1 time in total.
Image

alexvanuxem
Forecaster
Forecaster
Posts: 222
Joined: Mon Jan 31, 2022 4:41 pm
Location: Sint-Katelijne-Waver, Belgium
Station model: Davis Vantage Pro 2
Software: Meteobridge
Contact:

Re: Multiple pages mod

Post by alexvanuxem » Mon Oct 16, 2023 3:56 pm

thx!!
Image

User avatar
amonphi
Advisor
Advisor
Posts: 64
Joined: Mon Sep 10, 2018 12:52 pm
Location: Italy
Station model: Ecowitt GW1003
Software: WU
Contact:

Re: Multiple pages mod

Post by amonphi » Thu Nov 16, 2023 2:42 pm

davidefa wrote: Sun Oct 15, 2023 10:01 pm In Meteotemplate you can only configure a single ( home ) page.
With this mod you can add as many ( configurable ) pages as you want to your meteotemplate site.
In this way you are not obliged to create a kilometric home page, very long to scroll ( and also very slow to load ), but you can divide it in a few pages.

How does this work?
- simply create an homepage layout ( via the meteotemplate control panel ) and save it with a name ( short name, max 8 chars ), for example 'page2' ( you can create as many as you want ), meteotemplate already does this
- the mod extends the indexDesktop.php scripts ( used to load the home page ) so that you can pass a 'layout' parameter to load one of the layout created in previously ( not only the default one )
- to load the page2 layout, for example, point your browser to ( note the .txt added after the layout name ):

Code: Select all

indexDesktop.php?layout=page2.txt&nonewpage
- the additional parameter '&nonewpage' is an addition to the meteotemplate menù to open the page in the current tab ( default behaviour is open in a new tab, which is annoying in this case )

Installation
Simply unzip the archive in the root directory of the meteotemplate installation ( it will overwrite the files with the same name ). It is compatible with meteotemplate 18.0 and 19.0


sitemultipage01.png
Hi @davidefa ,
I installed Multiple pages mod (I find it very useful), I added new tab to the menu and in the "Use this tab as a link, URL:" field I inserted my new home2 https://meteopaparano.altervista.org/te ... &nonewpage which of course is now empty.
home2.jpg
home2.jpg (151.57 KiB) Viewed 11114 times
However, I can't understand how to set it from the control panel because if I open it, it goes to the control panel of the main home already set... I always get lost in this nonsense!

Thank you
Image

Post Reply