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":"baker", // required, the DB name of the category
    "tileSet":"products", // optional, filter category for ("products", "content")
    "displayName":"Baker", // required, text to display in category list
    "thumbnail":"... image url ...", // optional
    "heroImage":"... image url ...", // optional
    "mobileHeroImage":"... image url ...", // optional, mobile over-ride
    "title":"Gifts for The Baker", // optional, text to display in hero if no hero image
    "subCategories":[
        {
            "label":"... text to display ..." // 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
    "displayName":"Baker", // 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":{ "tileAspectRatio":1, "forceGrid":true },

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