User Tools

Site Tools


wiki:aw:cmxconfig_page

This is an old revision of the document!


The cmxConfig Object

This is used extensively to configure the site.

General

This structure is used to tell CumulusMX where to find your data, your NOAA report and the menu. By default they assume that you upload your data and webpages to the same location and that you have not modified the default settings in CumulusMX. If this is not the case, you will need to edit these three options.

DataThis should contain the path1) to your data. It can be relative or absolute - start with a '/' as required.
MenuThis should be correct unless you create your own menu. In which case change the name to whatever you have used.
NOAAReportPathAgain this should be correct unless you have specified a different location for your NOAA Reports.

Charts

This section is dynamically managed when you visit either the Trends or Historic chart pages. They record which chart you have selected so that when you revisit the page2) you see the same chart you were last looking at.

See more

Records

This section is also dynamically used when you visit either the monthly or 'All Records' pages. For a specific month, use the month number minus 1, I.e., 0 to 11, or one of 'Alltime', 'ThisYear', or 'ThisMonth' for the 'All Records' page.

Note If you don't have data for a specific month, it will still display but with '–' for all values and dates.

Custom

StandardMenu

Set this to true if you prefer the standard bar menu across the top of the screen. Setting to false uses the hamburger menu.

This is not active in this version - it id for future developments.

Theme

Use this option as in previous versions. Set it to the theme name as found in the themes subfolder but without the .css file extension.

If this is left blank, the CumulusMX logo will be used, if it contains None then no logo will be used4), otherwise provide an absolute or relative path to your chosen logo image. See more

BannerImage

Leave blank for no image, otherwise provide an absolute or relative path to your chosen image. See more

The cmxConfig Object

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: '',
    }
};

Static Head & Static Foot

As in previous templates, both the banner and the footer are static by default. I.e., they attach to the top and bottom of the screen regardless of the page content. Setting either of these to false will cause theme to scroll with the page.

Padding

Again a standard feature of my templates, you can adjust the gap between the banner and the footer. Entries cannot be negative and setting them to zero will not mean there is no gap; that is also determined by element padding within the content of the page.

The Gull

The gull at the bottom left of the screen is animated by default. Setting the 'Speed' to zero will stop the animation. There are a number of animations in the main.css stylesheet that can be used as an alternative. These are: gull-FadeIn, gull-GrowUp, gull-SlideIn-from-Left, and gull-SlideIn-from-Right.

The final option - 'OnTop' is used to set the gull above or below page content. It is below by default.

1)
This is the path relative to where your pages are located.
2)
In the current session.
3)
Only if you enable snow charts in CumulusMX
4)
I don't recommend this unless your banner, see next entry, contains the name of your site in some way.
wiki/aw/cmxconfig_page.1760203578.txt.gz · Last modified: by Neil