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

The 'Custom' section

This section covers all the various options you can use to personalise your site. The first two options control the menu and has been covered elsewhere.

Theme

The Alternative Public Website is supplied with Fourteen themes with grey being the default. If this entry is blank or contains the name of a non-existent theme, the default grey theme is used. Adding the name of a theme here will cause that colour scheme to be applied to your site. See the playground:aw2:themes page for further details.

Logo

With this version of the template, you can easily replace the standard logo with your own. Simple add the path and name of the required logo to this entry. Note The maximum height of the logo is 80px. If yours is bigger it will be reduced in height and width proportionately. I would not recommend a width greater than 350px.

With this version of the template you can also add your own banner image. It will cover the full screen width and include the menu area. You are advised to make the image at least 4000px wide to accommodate wide screens on visitors monitors. The image will be aligned along its bottom edge and centered. It will also be scaled to cover the available area. To ensure that the menu is always leadgible, standard menus will cover the image with a background colour.

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.1760203521.txt.gz · Last modified: by Neil