==Editing the website menu==
The website menu is held in the file ''my-menu.js''. AnThis imageensures ofthat thisit isdoes shownnot below:conflict with the existing menu.
It is now possible to add dividing bars to sub-menus as well as extra menu items. The menu is shown below:
Menu configuration file for NEW CuMX template
Last modified: 2022/07/05 11:39:38
menu.js - typical name, you define the one used in setpagedata.js<br>
It is STRONGLY RECOMMENDED that if you customise this file, you create a new file with a different name, e.g. mymenu.js
and change setpagedata.js to use that file. This will avoid your customisations being accidentally overwritten during upgrades<br>
Properties:
.title - This is the text that appears in the menu bar.
.menu - can be 'b' (both menus), 'w' (wide menu ONLY), 'n' (narrow [mobile] menu ONLY)
.new_window:true - forces the link to open in new browser window
.url - This is the address of the page. if it is to an external page on another site it must include the full url
The two entries that are '#' are special and are configured by the website.
.forum:true - flags a forum link menu item, it will use the url provided in CuMX config, if that is blank the menu item will be hidden
.webcam:true - flags a webcam link menu item, it will use the url provided in CuMX config, if that is blank the menu item will be hidden
<nowiki>
some text
menuSrc = [
{title: "NowDashboard", menu: "b", url: "index.htmhtml"},
{title: "Today:", menu: "b", url: "today.htmhtml"},
{title: "Yesterday", menu: "b", url: "yesterday.htmhtml"},
{title: "Today-Yest", menu: "b", url: "todayyesttodayVyest.htmhtml"},
{title: "RecordsGauges", menu: "b", submenu: true, itemsurl: ["gauges.html"},
{title: "This MonthRecords", menu: "b", url submenu: "thismonth.htm"}true, items: [
{title: "This YearMonth<i class=\"fa-solid fa-rectangle-list\"></i>", menu: "b", url: "thisyearrecordsthismonth.htmhtml"},
{title: "AllThis TimeYear<i class=\"fa-solid fa-rectangle-list\"></i>", menu: "b", url: "recordrecordsthisyear.htmhtml"},
{title: "MonthlyAll Time<i class=\"fa-solid fa-rectangle-list\"></i>", menu: "b"., url: "monthmlyrecordsrecordsalltime.htmhtml"},
{title: "Monthly<i class=\"fa-solid fa-rectangle-list\"></i>", menu: "b", url: "recordsmonthly.html"},
{title: "Charts", menu: "b", submenu url: true"#"}, items: [
{title: "All records<i class=\"Trendsfa-solid fa-rectangle-list\"></i>", menu: "b", url: "trendsrecords.htmhtml"},
{title: "Select-a-graph", menu: "b", url: "selectchart.htm"}, ▼
{title: "HistoricCharts", menu: "b", url submenu: "historic.htm"}true, items: [
{title: "Trends<i class='fa-solid fa-chart-line'></i>", menu: "b", url: "chartstrends.html"},
{title: "ReportsSelect-a-graph<i class='fa-solid fa-chart-line'></i>", menu: "b", url: "noaareportchartsselect.htmhtml"},
{title: "ForumHistoric<i class='fa-solid fa-chart-line'></i>", menu: "b", url: "#chartshistoric.html", forum: true, new_window: true},
{title: "Webcam", menu: "b", url: "#", webcam: true} ▼
▲ {title: " Select-a-graphReports", menu: "b", url: " selectchartnoaareports. htmhtml"},
{title: "Forum", menu: "b", url: "#", forum: true, new_window: true},
▲ {title: "Webcam <i class='fa-solid fa-camera'></i>", menu: "b", url: "#", webcam: true}
</nowiki>
'''Things to note'''
* It is possible to use ''Font-Awsome'' icons in the menu
*; You don't need to add sub-menu indicator icons as this is embedded in the code.
* You can add menu dividers to the sub-menus by adding an entry as shown below:
'''{title: "", menu: "b", url: "#"}'''
*; It can be placed in both menus, only the full screen menu or the mobile menu as required.
====Other changes====
* If you want to change the language, simply enter translations for the titles only.
The mobile menu now collapses correctly if you select a different sub-menu - you don't have to close a submenu manually before you open another one.
* If you want to add an entry copy the entry above and edit it as required.
* To create a whole new sub-menu, copy and paste either the section that starts with the '''title: "Records"...''' or '''title: "Charts"...''' and then edit as required.
==An Alternative Default Website==
|