Skip to content

Page Theme Settings

Fraser Harris edited this page Nov 8, 2015 · 10 revisions

Page theme_settings are a JSON object constructed from the following. Everything is optional.

Home

The "home" category is the category that is loaded by default.

"home": {
  "category": "... category name ...",
  "hero": "... tile ID ..." // Over-rules the home categories hero
},

Hero Defaults

Used if the category doesn't provide hero data

"defaults": {
    "heroImage": "... image url ...",  // optional
    "mobileHeroImage": "... image url ...", // optional, over-rules heroImage on mobile
    "heroTitle": "... text ..." // optional, lower priority than HeroImages, a string of text
},

Categories

Categories and mobile categories are both display instructions for the category area as well as display instructions about the categories themselves. If not provided, the category area is not displayed.

"categories":{
    ... // category data
},
"mobileCategories":{
    ... // optional, over-rules categories on mobile
},

Category object format:

{
    "name": string, // required, the DB name of the category
    "tileSet": "products" or "content", // optional, filter on category
    "displayName": string, // required, text to display in category list
    "thumbnail": image url, // optional
    "heroImage": image url, // optional
    "mobileHeroImage": image ulr, // optional, mobile over-ride
    "title": string or HTML, // optional, text to display in hero if no hero image
    "subCategories":[
        {
            "label": string or HTML // helper label
        },
        {
            ... // sub-categories follow same format as a category
        }
    ],
},

Categories or sub-categories can also be links:

{
    "url": link, // required, takes priority over `name` if that is also provided
    "name": string, // required for sub-categories, must be unique within this category
    "displayName": string, // required, text to display in category list
    "thumbnail": image url, // optional
},

Categories or sub-categories can also be containers for sub-categories:

{
    "displayName":"Baker", // required, text to display in category list
    "thumbnail":"... image url ...", // optional
    "subCategories":[
        {
            "label":"... text to display ..." // helper label
        },
        {
            ... // sub-categories follow same format as a category
        }
    ]
},

Masonry

Control the feed display

"masonry":{
    "forceGrid": boolean // Enables grid pattern. default: true
    "tileAspectRatio": int, // Expected base tile aspect ratio. default: 0.7
    "heightRange": int // Allowed variability around tileAspectRatio = +/- heightRange/2. default: 0.6
},

Tiles

"tiles":{
    "wideableTemplates":{
        "image":true,
        "product":true
    },
    "wideProbability": integer // default is 0.5
    "openTileInHero": boolean // default: False
    "openProductTileInPDP": boolean // default: False
},

Other

"gaAccountNumber":"UA-23764505-25", // Google Analytics id for this store
"social_buttons":null,
"useAffiliateLinks":true, // toggle whether to use `affiliateLink` for click-outs, if available
"column_width":341,
"categoryHome":false,
"minImageWidth":400, // restriction on Image object (does not apply to specified urls)
"stickyCategories":true, // categories stick to top of page
Clone this wiki locally