Like all previous versions of the alternative website, all settings are now held in one place - the cmxConfig object held in the page-control.js file.
This object holds the location of the menu to use, the location of your data, the path and name of your menu, the location of your NOAA Reports and other features that the website uses. This object is stored locally on your machine as 'SessionStorage' with the name suffix apwConfig so is only stored for the current browsing session and will not be retained once the browser is closed.
Before any page is fully loaded your browsers current Session Storage is checked to see if a copy of the cmxConfig object already exists, if it does, it is used to configure the page. If it does not not then it is created. This is then used throughout the site to access data, theme colours and other configurable options.
Below is an explanation of the critical entries.
This points to the location of your *.json data files1) uploaded by CumulusMX. CumulusMX normally uploads these to the same location as the *.htm page files. This entry allows you to use a custom locations.
Unlike general data CumulusMX allows you to specify your own location for any NOAA reports that you choose to publish. The default location is 'Reports/'. This is a relative path and so a sub-folder of your site. If you choose an alternative location then you can use this entry to provide the required access.More
This should be used to point to the javascript menu file used to drive all the menus on the site. Unless you use your own modified menu, there should be little need to edit this. Its default value is js/ows-menu.js. More details about creating your own menu can be found on the page Creating your own menu.
This area is used to configure other user settings. This is covered in detail in the wiki:aw:cmxConfig
cmxConfig = { Charts: { Trends: '', Historic: '', }, Custom: { StandardMenu: false, Dropdown: true, Theme: '', Logo: '', BannerImage: '', StaticHead: true, StaticFoot: true, PaddingTop: '2', PaddingBottom: '1', PaddingUnits: 'em', }, Data: '', Menu: 'js/ows-menu.js', NOAAReportPath: 'Reports/', Gull: { Animation: '', Speed: 10, OnTop: false, }, Records: { All: '', Monthly: '', } };
As in the AI, the seagull is animated. The three settings for the gull determine the animation to use, the speed in seconds of that animation and whether or not the gull sits on top of or below other page content.
Both these entries are dynamic in that they are used by the site to record the last Trends or Historic chart or Monthly or All Records recordset viewed so that when a visitor returns to them, the same chart / recordset is displayed.
The charts section can be used to dictate which chart is displayed when a visitor first views the respective page.
Previously I included a command in page-manager.js to clear the sessionStorage on every page load. I have not included this in this version although it is still a valid command.
See more
My preferred method is to use the Developer Tools available in most browsers and to edit the sessionStorage variable directly. For my Alternative Public Website the variable always ends: -apwConfig and is prefixed with the parent folder name. You should be able to edit the Values directly and see the effect simply by refreshing the page.
If this is not possible, for whatever reason, simply close the browser and reload the page. The session variable will have been deleted and whatever you have stored in the page-control.js cmxConfig variable will be used.
The contents of this panel can now be changed without editing the index.html page.
A new index-info.html file has been added that can be edited to contain whatever you want to appear in this panel. Just edit this file and its contents will be used instead of the coded content.Note