{"_id":"560a2ef787b71d0d000d3a46","__v":120,"project":"55a6e72e8cc73e0d00096635","category":{"_id":"58105ad54a8aa50f00aa4cba","__v":0,"project":"55a6e72e8cc73e0d00096635","version":"55a6e72f8cc73e0d00096638","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-10-26T07:27:17.418Z","from_sync":false,"order":8,"slug":"front-matter-attributes","title":"Front-Matter Attributes"},"parentDoc":null,"version":{"_id":"55a6e72f8cc73e0d00096638","project":"55a6e72e8cc73e0d00096635","hasReference":false,"__v":29,"hasDoc":true,"createdAt":"2015-07-15T23:05:19.125Z","releaseDate":"2015-07-15T23:05:19.125Z","categories":["55a6e7308cc73e0d00096639","55b7ed07aea7c8190058badb","5604567c0c78b00d0039b191","5605e6f23a93940d002b3e4a","5605f2bba4574a0d00811365","5605f309a4574a0d00811366","5608e3b98aedf50d0004cf8f","5608e4318aedf50d0004cf90","5608e6b5a7cc2f0d00d9754d","5608e6d331beb60d001b6560","5608f879a7cc2f0d00d97580","560b097887b71d0d000d3bd9","560b13cbafa0990d00979545","560b5cbec341310d00de2a01","560b5cd0c341310d00de2a02","566a35b81e08750d00a0c49b","566a3e8503b4b20d00d02a4a","567889d307bf6a0d0083edc8","569c8b7c15bb390d00db6f9d","56b254dc65ddf50d0076ba8f","57a8ebc4cdeea20e001d2a63","57e48a4000c8680e00fae6e7","5808216773557d0f00a1e428","58105ad54a8aa50f00aa4cba","58105bf298aea40f00afa3ba","58105f548a4aed0f00d67536","581061b898aea40f00afa3be","584b3de7e5f3a42300df6ef7","596839a75965d400155bb750"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"user":"55a6caa022cfa321008e01d6","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-29T06:25:59.090Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[block:html]\n{\n  \"html\": \"<A NAME=\\\"Front-ref\\\"></a>The following listings cover attributes that you can invoke via <a href=\\\"http://yaml.org/\\\">YAML</a> front-matter expressions. The listed <NOBR>Default Values</nobr> apply where a corresponding value has <i>not</i> been set in front matter or in <a href=\\\"/docs/configjson-reference\\\">config.json</a>:<br>\\n\\n<ul>\\n  <li><a href=\\\"#Front-ref-global\\\">Global Attributes</a></li>\\n <li><a href=\\\"#Front-ref-blog\\\">Blog Attributes</a></li>\\n <li><a href=\\\"#Front-ref-cat\\\">Category Attributes</a></li>\\n <li><a href=\\\"#Front-ref-prod\\\">Product Attributes</a></li>\\n <li><a href=\\\"#Front-ref-brand\\\">Brand Attributes</a></li>\\n <li><a href=\\\"#Front-ref-brandlist\\\">Brand List Attributes</a></li>\\n <li><a href=\\\"#Front-ref-cart\\\">Cart Attributes</a></li>\\n <li><a href=\\\"#Front-ref-search\\\">Search Attributes</a></li>\\n</ul>\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"You can use front matter to specify resources on the tops of page templates in your <span class=\\\"inline-code\\\">&lt;theme-name&gt;/templates/pages/</span> subdirectory. However, you _cannot_ use front matter to accomplish this on pages in these subdirectories:\\n* <span class=\\\"inline-code\\\">&lt;theme-name&gt;/templates/components/</span>\\n* <span class=\\\"inline-code\\\">&lt;theme-name&gt;/templates/layout/</span>\\n* <span class=\\\"inline-code\\\">&lt;theme-name&gt;/templates/pages/custom/</span>\\n\\nTo render the specified resources on the page, make sure that your template contains a Handlebars expression for the [object/properties](/docs/stencil-object-model) corresponding to each of your front-matter declarations.\\n\\nPlease bear in mind that if a front-matter directive contains an invalid option, Stencil CLI will silently ignore that option.\",\n  \"title\": \"Restrictions\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<h2> <a name=\\\"Front-ref-global\\\"></a>Global Attributes </h2>\\n\\nGlobal attributes are available on all pages. <br><br>\\n\\n<table>\\n  <tr>\\n    <td>Attribute</td>\\n    <td>Option with Sample Assignment</td>\\n    <td>Default Value</td>\\n    <td>Details and Other \\nAllowable Values/Results</td>\\n  </tr>\\n  <tr>\\n    <td class=\\\"\\\">customer:</td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">Customer attributes are always included, and are available if the active shopper is logged in.</td>\\n  </tr>\\n\\n  <tr>\\n  \\t<td class=\\\"\\\"></td>\\n  \\t<td class=\\\"\\\">addresses: true</td>\\n    <td class=\\\"\\\">true – on address page<br><p></p>\\n\\nnull – on all other pages</td>\\n    <td class=\\\"\\\">Boolean indicating whether to retrieve addresses for this customer.<br><p></p> \\n\\nNo filtering available. Default sorting is by address id, from lowest to highest.<br><p></p>\\n\\nnull or false: Do not retrieve addresses.\\ntrue: Retrieve addresses.</td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">returns: true</td>\\n    <td class=\\\"\\\">true – on returns page<br><p></p>\\n\\nnull – on all other pages</td>\\n    <td class=\\\"\\\">Boolean indicating whether to retrieve product-return requests for this customer.<br><p></p> \\n      \\n      No filtering available.<br><p></p>\\n      \\n      true: Retrieve requests.<br><p></p>\\n      \\n      null or false: <NOBR>Do not</nobr> retrieve requests.</td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">wishlists: <br>\\n        <span class=\\\"indent1\\\">limit: &lt;number&gt;</span></td>\\n    <td class=\\\"\\\">null</td>\\n    <td class=\\\"\\\">null: No wishlists displayed.\\n      <br><p></p>\\n      &lt;number&gt; limits the number of wishlists displayed.\\n      <br><p></p>\\n      If &lt;number&gt; is not defined, retrieves an unlimited number of wishlists.</td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">orders: <br>\\n        <span class=\\\"indent1\\\">limit: &lt;number&gt;</span></td>\\n    <td class=\\\"\\\">null</td>\\n    <td class=\\\"\\\">Contains all orders, complete or not.\\n      <br><p></p>\\n      null: no orders displayed.\\n      <br><p></p>\\n      &lt;number&gt; limits the number of orders displayed.\\n      <br><p></p>\\n      If &lt;number&gt; is not defined, displays 20 orders. (Default sorting is by order id, from lowest to highest.)</td>\\n  </tr>\\n\\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">recently_viewed_products:</td>\\n    <td class=\\\"\\\">null</td>\\n    <td class=\\\"\\\">Boolean indicating whether to display recently viewed products.<br><p></p>\\n\\nNo filtering available.</td>\\n  </tr>\\n\\n  <tr>\\n    <td class=\\\"\\\">products:</td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">(When filtering/limiting, products' default sorting is by order id, from lowest to highest.)</td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">featured: <br>\\n        <span class=\\\"indent1\\\">limit: &lt;number&gt;</span></td>\\n    <td class=\\\"\\\">null</td>\\n    <td class=\\\"\\\">null: No featured products displayed.<br><p></p>\\n&lt;number&gt; limits the number of featured products displayed.\\n      <br><p></p>\\n      If &lt;number&gt; is not set, defaults to 4 products.</td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">new:<br>\\n      <span class=\\\"indent1\\\">limit: &lt;number&gt;</span></td>\\n    <td class=\\\"\\\">\\nnull</td>\\n    <td class=\\\"\\\">null: No new products displayed.<br><p></p>\\n&lt;number&gt; limits the number of new products displayed. Maximum allowable value is 25.\\n      <br><p></p>\\n      If &lt;number&gt; is not defined, defaults to 8 products.</td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">top_sellers: <br>\\n      <span class=\\\"indent1\\\">limit:  &lt;number&gt;</span></td>\\n    <td class=\\\"\\\">null</td>\\n    <td class=\\\"\\\">null: No top-selling products displayed.\\n      <br><p></p>\\n      &lt;number&gt; limits the number of top sellers displayed.\\n      <br><p></p>\\n      If &lt;number&gt; is not defined, defaults to all top sellers.</td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\">carousel: true</td>\\n    <td class=\\\"\\\"></td>\\n  <td class=\\\"\\\">null</td>\\n    <td class=\\\"\\\">Boolean indicating whether to display a carousel on storefront.\\n      <br><p></p>\\n      No filtering available.\\n      <br><p></p>\\n      null or false: No carousel display.</td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\">blog:</td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">(Default sorting is by published_date, from most-recent to earliest.)</td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">recent_posts:<br>\\n      <span class=\\\"indent1\\\">limit: &lt;number&gt;</span>\\n    </td>\\n    <td class=\\\"\\\">20</td>\\n    <td class=\\\"\\\">null: No recent blog posts displayed.\\n      <br><p></p>      \\n      &lt;number&gt; limits the number of recent blog posts displayed.\\n      <br><p></p>      \\n      If &lt;number&gt; is not defined, defaults to the maximum of 20 blog posts.</td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">summary: &lt;number&gt;</td>\\n    <td class=\\\"\\\">100</td>\\n    <td class=\\\"\\\"><!-- null: No summary characters displayed.<br><p></p> -->      \\n      &lt;number&gt; sets the number of characters to display in each blog-post summary.\\n      <br><p></p>\\n      If &lt;number&gt; is not defined, displays 100 characters.</td>\\n  </tr>\\n  \\n  <!-- <tr>\\n    <td class=\\\"\\\">brands:<br>\\n        <span class=\\\"indent1\\\">&lt;number&gt;</span></td>\\n    <td class=\\\"\\\">null</td>\\n    <td class=\\\"\\\">null: Do not display a brand list.<br><p></p>\\n&lt;number&gt; limits the number of brands to return.<br><p></p>\\nIf &lt;number&gt; is not defined, returns all brands.</td>\\n  </tr> -->\\n  \\n  <tr>\\n    <td class=\\\"\\\">cart: true</td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">false</td>\\n    <td class=\\\"\\\">Boolean indicating whether to retrieve cart data.<br><p></p>\\ntrue: Return cart data.<br><p></p>\\nfalse: Do not return cart data.</td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\">categories: true</td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">false</td>\\n    <td class=\\\"\\\">Boolean indicating whether to retrieve the <a href=\\\"docs/global-resources#Categories\\\">category tree</a> during an AJAX request.\\n      <br><p></p>\\n      true: Retrieve the category tree.\\n      <br><p></p>\\n      false: Do not retrieve the category tree.</td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">description: true</td>\\n    <td class=\\\"\\\">\\nfalse</td>\\n    <td class=\\\"\\\">\\nBoolean indicating whether to retrieve category descriptions dynamically from the database.\\n      <br><p></p>\\n      Set to true for themes that must display category descriptions when pages render. (This can slow page loads.)</td>\\n  </tr>\\n    \\n  <tr>\\n    <td class=\\\"\\\">shop_by_brand:</td>\\n    <td class=\\\"\\\">limit: &lt;number&gt;</td>\\n    <td class=\\\"\\\">null</td>\\n    <td class=\\\"\\\">Typically used in a footer or sidebar.<br><p></p>\\nnull: Do not display this brand list.<br><p></p>\\n&lt;number&gt; limits the number of brands to return.<br><p></p>\\nIf &lt;number&gt; is not defined, returns 10 brands, ordered by the number of products per brand.</td>\\n  </tr>\\n\\n  <!-- <tr>\\n    <td class=\\\"\\\">suggested_products:<br>\\n  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; limit: &lt;number&gt;</td>\\n    <td class=\\\"\\\">null</td>\\n    <td class=\\\"\\\">null: Do not display suggested products.<br><p></p>\\n&lt;number&gt; limits the number of suggested products to return.<br><p></p>\\nIf &lt;number&gt; is not defined, returns 4 suggested products.</td>\\n  </tr> -->\\n</table>\\n\\n\\n<h2> <a name=\\\"Front-ref-cat\\\"></a>Category Attributes</h2>\\n\\nCategory attributes are available in the context of a category.<br><br>\\n\\n<table>\\n  <tr>\\n    <td>Attribute</td>\\n    <td>Option with Sample Assignment</td>\\n    <td>Default Value</td>\\n    <td>Details</td>\\n  </tr>\\n  <tr>\\n    <td class=\\\"\\\">category:</td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n  </tr>\\n\\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">shop_by_price:</td>\\n    <td class=\\\"\\\">\\nfalse</td>\\n    <td class=\\\"\\\">\\nBoolean indicating whether to display Shop-by-Price controls.</td>\\n  </tr>\\n\\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">products:<br>\\n        <span class=\\\"indent1\\\">limit: &lt;number&gt;</span></td>\\n    <td class=\\\"\\\">\\n16</td>\\n    <td class=\\\"\\\">\\nDefines the number of products displayed per page for this category. Range of possible values is 1&ndash;100 products.</td>\\n  </tr>\\n</table>\\n\\n\\n<h2> <a name=\\\"Front-ref-blog\\\"></a>Blog Attributes</h2>\\n\\nBlog attributes are available in the context of a blog.<br><br>\\n\\n<table>\\n  <tr>\\n    <td>Attribute</td>\\n    <td>Sub-Attribute</td>\\n    <td>Option with Sample Assignment</td>\\n    <td>Default Value</td>\\n    <td>Details</td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\">blog:</td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n  </tr>\\n\\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">posts:</td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">(Default sorting is by published_date, from most-recent to earliest.)</td>\\n  </tr>\\n\\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">limit: &lt;number&gt;</td>\\n    <td class=\\\"\\\">null</td>\\n    <td class=\\\"\\\">null: No blog posts displayed.<br><p></p>\\n      &lt;number&gt; limits the number of blog posts displayed.<br><p></p>\\n      Maximum is 20 blog posts per page.\\n    </td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">pages: &lt;number&gt;</td>\\n    <td class=\\\"\\\">5</td>\\n    <td class=\\\"\\\">\\nnull: No pagination.<br><p></p>\\n      \\n      &lt;number&gt; sets the number of pages to display in pagination links.<br><p></p>\\n      \\n      If &lt;number&gt; is not defined, defaults to 5 pages.\\n    </td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">summary: &lt;number&gt;</td>\\n    <td class=\\\"\\\">250</td>\\n    <td class=\\\"\\\"> <!-- null: No summary characters displayed.<br><p></p> -->  \\n      &lt;number&gt; sets the number of characters to display in each blog-post summary.<br><p></p>\\nIf &lt;number&gt; is not defined, displays 250 characters.</td>\\n  </tr>\\n</table>\\n\\n\\n<h2> <a name=\\\"Front-ref-prod\\\"></a>Product Attributes</h2>\\n\\nProduct attributes are available in the context of a product.<br><br>\\n\\n<table>\\n  <tr>\\n    <td>Attribute</td>\\n    <td>Option with Sample Assignment</td>\\n    <td>Default Value</td>\\n    <td>Details</td>\\n  </tr>\\n  <tr>\\n    <td class=\\\"\\\">product:</td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">(When filtering/limiting, products' default sorting is by order id, from lowest to highest.)</td>\\n  </tr>\\n\\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">videos:<br>\\n        <span class=\\\"indent1\\\">limit: &lt;number&gt;</span></td>\\n    <td class=\\\"\\\">\\n[unlimited]</td>\\n    <td class=\\\"\\\">If product.videos is not defined, no videos are returned.<br><p></p>\\n      \\n      If product.videos is defined, the default behavior is to return all videos. <!-- Check & correct this. --> <br><p></p>\\n      \\n      If product.videos.limit is also defined, &lt;number&gt; sets the maximum number of videos returned.</td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">images:<br>\\n        <span class=\\\"indent1\\\">limit: &lt;number&gt;</span></td>\\n    <td class=\\\"\\\">\\n[unlimited]</td>\\n    <td class=\\\"\\\">If product.images is not defined, no images are returned.<br><p></p>\\n      \\n      If product.images is defined, you must also define product.images.limit, which throttles the number of images returned. <br><p></p>\\nThe maximum allowable value for this option's &lt;number&gt; parameter is 5 images.</td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">reviews: true<br>\\n        <span class=\\\"indent1\\\">limit: &lt;number&gt;</span></td>\\n    <td class=\\\"\\\">[false]</td>\\n    <td class=\\\"\\\">Boolean indicating whether to display product reviews.\\n      <br><p></p>      \\n      If product.reviews is present, and is not explicitly set to \\\"false\\\", reviews will appear.\\n      <br><p></p>      \\n      If &lt;number&gt; is not defined, defaults to 10 reviews.<br><p></p>\\n      (When filtering/limiting reviews, default sorting is by review id, from lowest to highest.)</td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">related_products:<br>\\n        <span class=\\\"indent1\\\">limit: &lt;number&gt;</span></td>\\n    <td class=\\\"\\\">\\n[unlimited]</td>\\n    <td class=\\\"\\\">Displays products that are related by name.<br><p></p>\\n      \\n      &lt;number&gt; limits the number of products displayed.<br><p></p>\\n      \\n      If &lt;limit&gt; is absent or undefined, the default behavior is to display all related products.<br><p></p> \\n\\nInserting “limit:” with no integer will display 0 products. </td>\\n  </tr>\\n  \\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">similar_by_views:<br>\\n        <span class=\\\"indent1\\\">limit: &lt;number&gt;</span></td>\\n    <td class=\\\"\\\">[unlimited]</td>\\n    <td class=\\\"\\\">Displays products similar to those displayed in the current page context.<br><p></p>\\n      \\n      &lt;number&gt; limits the number of products displayed.<br><p></p>\\n      \\n      If &lt;limit&gt; is absent or undefined, default is to display 4 products.</td>\\n  </tr>\\n</table>\\n\\n\\n<h2> <a name=\\\"Front-ref-brand\\\"></a>Brand Attributes</h2>\\n\\nBrand attributes are available in the context of a brand.<br><br>\\n\\n<table>\\n  <tr>\\n    <td>Attribute</td>\\n    <td>Option with Sample Assignment</td>\\n    <td>Default Value</td>\\n    <td>Details</td>\\n  </tr>\\n  <tr>\\n    <td class=\\\"\\\">brand:</td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n  </tr>\\n\\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">products: <br>\\n      <span class=\\\"indent1\\\">limit: &lt;number&gt;</span></td>\\n    <td class=\\\"\\\">\\n50</td>\\n    <td class=\\\"\\\">\\nDefines the number of products displayed per page for this brand. Range of possible values is 1&ndash;50 products.</td>\\n  </tr>\\n</table>\\n\\n\\n<h2> <a name=\\\"Front-ref-brandlist\\\"></a>Brand List Attributes</h2>\\n\\nThese attributes are available in the context of a list of brands.<br><br>\\n\\n<table>\\n  <tr>\\n    <td>Attribute</td>\\n    <td>Option with Sample Assignment</td>\\n    <td>Default Value</td>\\n    <td>Details</td>\\n  </tr>\\n  <tr>\\n    <td class=\\\"\\\">brands:</td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">(When retrieving a collection of brands, default sorting is by brand id, from lowest to highest.)</td>\\n  </tr>\\n\\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">limit: &lt;number&gt;</td>\\n    <td class=\\\"\\\">50</td>\\n    <td class=\\\"\\\">\\nSets the number of brands displayed in the list. If &lt;limit&gt; is not defined, returns all brands, up to a maximum of 50.</td>\\n  </tr>\\n</table>\\n\\n\\n<h2> <a name=\\\"Front-ref-cart\\\"></a>Cart Attributes</h2>\\n\\nCart attributes are available in the context of a shopper's cart.<br><br>\\n\\n<table>\\n  <tr>\\n    <td>Attribute</td>\\n    <td>Sub-Attribute</td>\\n    <td>Option with Sample Assignment</td>\\n    <td>Default Value</td>\\n    <td>Details</td>\\n  </tr>\\n  <tr>\\n    <td class=\\\"\\\">cart</td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n  </tr>\\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">suggestions:</td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">Suggested products to display to shopper, based on cart contents. <NOBR>(If enabled,</nobr> these suggestions appear only immediately after the shopper adds an item to the cart.)</td>\\n  </tr>\\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">limit: &lt;number&gt;</td>\\n    <td class=\\\"\\\">null</td>\\n    <td class=\\\"\\\">null: Do not display suggested products.<br><p></p>\\n&lt;number&gt; limits the number of suggested products to return.<br><p></p>\\nIf &lt;number&gt; is not defined, returns 4 suggested products.</td>\\n  </tr>\\n</table>\\n\\n\\n<h2> <a name=\\\"Front-ref-search\\\"></a>Search Attributes</h2>\\n\\nSearch attributes are available in the context of a search results page.<br><br>\\n\\n<table>\\n  <tr>\\n    <td>Attribute</td>\\n    <td>Sub-Attribute</td>\\n    <td>Option with Sample Assignment</td>\\n    <td>Default Value</td>\\n    <td>Details</td>\\n  </tr>\\n  <tr>\\n    <td class=\\\"\\\">search</td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n  </tr>\\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">product_results:</td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n  </tr>\\n\\n  <tr>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\"></td>\\n    <td class=\\\"\\\">limit: &lt;number&gt;</td>\\n    <td class=\\\"\\\">16</td>\\n    <td class=\\\"\\\">\\nDefines the number of product search results displayed per page. Range of possible values is 1&ndash;100 products.</td>\\n  </tr>\\n</table>\"\n}\n[/block]","excerpt":"","slug":"front-matter-variables","type":"basic","title":"Attributes [Front-Matter] Reference"}

Attributes [Front-Matter] Reference


[block:html] { "html": "<A NAME=\"Front-ref\"></a>The following listings cover attributes that you can invoke via <a href=\"http://yaml.org/\">YAML</a> front-matter expressions. The listed <NOBR>Default Values</nobr> apply where a corresponding value has <i>not</i> been set in front matter or in <a href=\"/docs/configjson-reference\">config.json</a>:<br>\n\n<ul>\n <li><a href=\"#Front-ref-global\">Global Attributes</a></li>\n <li><a href=\"#Front-ref-blog\">Blog Attributes</a></li>\n <li><a href=\"#Front-ref-cat\">Category Attributes</a></li>\n <li><a href=\"#Front-ref-prod\">Product Attributes</a></li>\n <li><a href=\"#Front-ref-brand\">Brand Attributes</a></li>\n <li><a href=\"#Front-ref-brandlist\">Brand List Attributes</a></li>\n <li><a href=\"#Front-ref-cart\">Cart Attributes</a></li>\n <li><a href=\"#Front-ref-search\">Search Attributes</a></li>\n</ul>" } [/block] [block:callout] { "type": "warning", "body": "You can use front matter to specify resources on the tops of page templates in your <span class=\"inline-code\">&lt;theme-name&gt;/templates/pages/</span> subdirectory. However, you _cannot_ use front matter to accomplish this on pages in these subdirectories:\n* <span class=\"inline-code\">&lt;theme-name&gt;/templates/components/</span>\n* <span class=\"inline-code\">&lt;theme-name&gt;/templates/layout/</span>\n* <span class=\"inline-code\">&lt;theme-name&gt;/templates/pages/custom/</span>\n\nTo render the specified resources on the page, make sure that your template contains a Handlebars expression for the [object/properties](/docs/stencil-object-model) corresponding to each of your front-matter declarations.\n\nPlease bear in mind that if a front-matter directive contains an invalid option, Stencil CLI will silently ignore that option.", "title": "Restrictions" } [/block] [block:html] { "html": "<h2> <a name=\"Front-ref-global\"></a>Global Attributes </h2>\n\nGlobal attributes are available on all pages. <br><br>\n\n<table>\n <tr>\n <td>Attribute</td>\n <td>Option with Sample Assignment</td>\n <td>Default Value</td>\n <td>Details and Other \nAllowable Values/Results</td>\n </tr>\n <tr>\n <td class=\"\">customer:</td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\">Customer attributes are always included, and are available if the active shopper is logged in.</td>\n </tr>\n\n <tr>\n \t<td class=\"\"></td>\n \t<td class=\"\">addresses: true</td>\n <td class=\"\">true – on address page<br><p></p>\n\nnull – on all other pages</td>\n <td class=\"\">Boolean indicating whether to retrieve addresses for this customer.<br><p></p> \n\nNo filtering available. Default sorting is by address id, from lowest to highest.<br><p></p>\n\nnull or false: Do not retrieve addresses.\ntrue: Retrieve addresses.</td>\n </tr>\n \n <tr>\n <td class=\"\"></td>\n <td class=\"\">returns: true</td>\n <td class=\"\">true – on returns page<br><p></p>\n\nnull – on all other pages</td>\n <td class=\"\">Boolean indicating whether to retrieve product-return requests for this customer.<br><p></p> \n \n No filtering available.<br><p></p>\n \n true: Retrieve requests.<br><p></p>\n \n null or false: <NOBR>Do not</nobr> retrieve requests.</td>\n </tr>\n \n <tr>\n <td class=\"\"></td>\n <td class=\"\">wishlists: <br>\n <span class=\"indent1\">limit: &lt;number&gt;</span></td>\n <td class=\"\">null</td>\n <td class=\"\">null: No wishlists displayed.\n <br><p></p>\n &lt;number&gt; limits the number of wishlists displayed.\n <br><p></p>\n If &lt;number&gt; is not defined, retrieves an unlimited number of wishlists.</td>\n </tr>\n \n <tr>\n <td class=\"\"></td>\n <td class=\"\">orders: <br>\n <span class=\"indent1\">limit: &lt;number&gt;</span></td>\n <td class=\"\">null</td>\n <td class=\"\">Contains all orders, complete or not.\n <br><p></p>\n null: no orders displayed.\n <br><p></p>\n &lt;number&gt; limits the number of orders displayed.\n <br><p></p>\n If &lt;number&gt; is not defined, displays 20 orders. (Default sorting is by order id, from lowest to highest.)</td>\n </tr>\n\n <tr>\n <td class=\"\"></td>\n <td class=\"\">recently_viewed_products:</td>\n <td class=\"\">null</td>\n <td class=\"\">Boolean indicating whether to display recently viewed products.<br><p></p>\n\nNo filtering available.</td>\n </tr>\n\n <tr>\n <td class=\"\">products:</td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\">(When filtering/limiting, products' default sorting is by order id, from lowest to highest.)</td>\n </tr>\n \n <tr>\n <td class=\"\"></td>\n <td class=\"\">featured: <br>\n <span class=\"indent1\">limit: &lt;number&gt;</span></td>\n <td class=\"\">null</td>\n <td class=\"\">null: No featured products displayed.<br><p></p>\n&lt;number&gt; limits the number of featured products displayed.\n <br><p></p>\n If &lt;number&gt; is not set, defaults to 4 products.</td>\n </tr>\n \n <tr>\n <td class=\"\"></td>\n <td class=\"\">new:<br>\n <span class=\"indent1\">limit: &lt;number&gt;</span></td>\n <td class=\"\">\nnull</td>\n <td class=\"\">null: No new products displayed.<br><p></p>\n&lt;number&gt; limits the number of new products displayed. Maximum allowable value is 25.\n <br><p></p>\n If &lt;number&gt; is not defined, defaults to 8 products.</td>\n </tr>\n \n <tr>\n <td class=\"\"></td>\n <td class=\"\">top_sellers: <br>\n <span class=\"indent1\">limit: &lt;number&gt;</span></td>\n <td class=\"\">null</td>\n <td class=\"\">null: No top-selling products displayed.\n <br><p></p>\n &lt;number&gt; limits the number of top sellers displayed.\n <br><p></p>\n If &lt;number&gt; is not defined, defaults to all top sellers.</td>\n </tr>\n \n <tr>\n <td class=\"\">carousel: true</td>\n <td class=\"\"></td>\n <td class=\"\">null</td>\n <td class=\"\">Boolean indicating whether to display a carousel on storefront.\n <br><p></p>\n No filtering available.\n <br><p></p>\n null or false: No carousel display.</td>\n </tr>\n \n <tr>\n <td class=\"\">blog:</td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\">(Default sorting is by published_date, from most-recent to earliest.)</td>\n </tr>\n \n <tr>\n <td class=\"\"></td>\n <td class=\"\">recent_posts:<br>\n <span class=\"indent1\">limit: &lt;number&gt;</span>\n </td>\n <td class=\"\">20</td>\n <td class=\"\">null: No recent blog posts displayed.\n <br><p></p> \n &lt;number&gt; limits the number of recent blog posts displayed.\n <br><p></p> \n If &lt;number&gt; is not defined, defaults to the maximum of 20 blog posts.</td>\n </tr>\n \n <tr>\n <td class=\"\"></td>\n <td class=\"\">summary: &lt;number&gt;</td>\n <td class=\"\">100</td>\n <td class=\"\"><!-- null: No summary characters displayed.<br><p></p> --> \n &lt;number&gt; sets the number of characters to display in each blog-post summary.\n <br><p></p>\n If &lt;number&gt; is not defined, displays 100 characters.</td>\n </tr>\n \n <!-- <tr>\n <td class=\"\">brands:<br>\n <span class=\"indent1\">&lt;number&gt;</span></td>\n <td class=\"\">null</td>\n <td class=\"\">null: Do not display a brand list.<br><p></p>\n&lt;number&gt; limits the number of brands to return.<br><p></p>\nIf &lt;number&gt; is not defined, returns all brands.</td>\n </tr> -->\n \n <tr>\n <td class=\"\">cart: true</td>\n <td class=\"\"></td>\n <td class=\"\">false</td>\n <td class=\"\">Boolean indicating whether to retrieve cart data.<br><p></p>\ntrue: Return cart data.<br><p></p>\nfalse: Do not return cart data.</td>\n </tr>\n \n <tr>\n <td class=\"\">categories: true</td>\n <td class=\"\"></td>\n <td class=\"\">false</td>\n <td class=\"\">Boolean indicating whether to retrieve the <a href=\"docs/global-resources#Categories\">category tree</a> during an AJAX request.\n <br><p></p>\n true: Retrieve the category tree.\n <br><p></p>\n false: Do not retrieve the category tree.</td>\n </tr>\n \n <tr>\n <td class=\"\"></td>\n <td class=\"\">description: true</td>\n <td class=\"\">\nfalse</td>\n <td class=\"\">\nBoolean indicating whether to retrieve category descriptions dynamically from the database.\n <br><p></p>\n Set to true for themes that must display category descriptions when pages render. (This can slow page loads.)</td>\n </tr>\n \n <tr>\n <td class=\"\">shop_by_brand:</td>\n <td class=\"\">limit: &lt;number&gt;</td>\n <td class=\"\">null</td>\n <td class=\"\">Typically used in a footer or sidebar.<br><p></p>\nnull: Do not display this brand list.<br><p></p>\n&lt;number&gt; limits the number of brands to return.<br><p></p>\nIf &lt;number&gt; is not defined, returns 10 brands, ordered by the number of products per brand.</td>\n </tr>\n\n <!-- <tr>\n <td class=\"\">suggested_products:<br>\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; limit: &lt;number&gt;</td>\n <td class=\"\">null</td>\n <td class=\"\">null: Do not display suggested products.<br><p></p>\n&lt;number&gt; limits the number of suggested products to return.<br><p></p>\nIf &lt;number&gt; is not defined, returns 4 suggested products.</td>\n </tr> -->\n</table>\n\n\n<h2> <a name=\"Front-ref-cat\"></a>Category Attributes</h2>\n\nCategory attributes are available in the context of a category.<br><br>\n\n<table>\n <tr>\n <td>Attribute</td>\n <td>Option with Sample Assignment</td>\n <td>Default Value</td>\n <td>Details</td>\n </tr>\n <tr>\n <td class=\"\">category:</td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n </tr>\n\n <tr>\n <td class=\"\"></td>\n <td class=\"\">shop_by_price:</td>\n <td class=\"\">\nfalse</td>\n <td class=\"\">\nBoolean indicating whether to display Shop-by-Price controls.</td>\n </tr>\n\n <tr>\n <td class=\"\"></td>\n <td class=\"\">products:<br>\n <span class=\"indent1\">limit: &lt;number&gt;</span></td>\n <td class=\"\">\n16</td>\n <td class=\"\">\nDefines the number of products displayed per page for this category. Range of possible values is 1&ndash;100 products.</td>\n </tr>\n</table>\n\n\n<h2> <a name=\"Front-ref-blog\"></a>Blog Attributes</h2>\n\nBlog attributes are available in the context of a blog.<br><br>\n\n<table>\n <tr>\n <td>Attribute</td>\n <td>Sub-Attribute</td>\n <td>Option with Sample Assignment</td>\n <td>Default Value</td>\n <td>Details</td>\n </tr>\n \n <tr>\n <td class=\"\">blog:</td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n </tr>\n\n <tr>\n <td class=\"\"></td>\n <td class=\"\">posts:</td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\">(Default sorting is by published_date, from most-recent to earliest.)</td>\n </tr>\n\n <tr>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\">limit: &lt;number&gt;</td>\n <td class=\"\">null</td>\n <td class=\"\">null: No blog posts displayed.<br><p></p>\n &lt;number&gt; limits the number of blog posts displayed.<br><p></p>\n Maximum is 20 blog posts per page.\n </td>\n </tr>\n \n <tr>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\">pages: &lt;number&gt;</td>\n <td class=\"\">5</td>\n <td class=\"\">\nnull: No pagination.<br><p></p>\n \n &lt;number&gt; sets the number of pages to display in pagination links.<br><p></p>\n \n If &lt;number&gt; is not defined, defaults to 5 pages.\n </td>\n </tr>\n \n <tr>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\">summary: &lt;number&gt;</td>\n <td class=\"\">250</td>\n <td class=\"\"> <!-- null: No summary characters displayed.<br><p></p> --> \n &lt;number&gt; sets the number of characters to display in each blog-post summary.<br><p></p>\nIf &lt;number&gt; is not defined, displays 250 characters.</td>\n </tr>\n</table>\n\n\n<h2> <a name=\"Front-ref-prod\"></a>Product Attributes</h2>\n\nProduct attributes are available in the context of a product.<br><br>\n\n<table>\n <tr>\n <td>Attribute</td>\n <td>Option with Sample Assignment</td>\n <td>Default Value</td>\n <td>Details</td>\n </tr>\n <tr>\n <td class=\"\">product:</td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\">(When filtering/limiting, products' default sorting is by order id, from lowest to highest.)</td>\n </tr>\n\n <tr>\n <td class=\"\"></td>\n <td class=\"\">videos:<br>\n <span class=\"indent1\">limit: &lt;number&gt;</span></td>\n <td class=\"\">\n[unlimited]</td>\n <td class=\"\">If product.videos is not defined, no videos are returned.<br><p></p>\n \n If product.videos is defined, the default behavior is to return all videos. <!-- Check & correct this. --> <br><p></p>\n \n If product.videos.limit is also defined, &lt;number&gt; sets the maximum number of videos returned.</td>\n </tr>\n \n <tr>\n <td class=\"\"></td>\n <td class=\"\">images:<br>\n <span class=\"indent1\">limit: &lt;number&gt;</span></td>\n <td class=\"\">\n[unlimited]</td>\n <td class=\"\">If product.images is not defined, no images are returned.<br><p></p>\n \n If product.images is defined, you must also define product.images.limit, which throttles the number of images returned. <br><p></p>\nThe maximum allowable value for this option's &lt;number&gt; parameter is 5 images.</td>\n </tr>\n \n <tr>\n <td class=\"\"></td>\n <td class=\"\">reviews: true<br>\n <span class=\"indent1\">limit: &lt;number&gt;</span></td>\n <td class=\"\">[false]</td>\n <td class=\"\">Boolean indicating whether to display product reviews.\n <br><p></p> \n If product.reviews is present, and is not explicitly set to \"false\", reviews will appear.\n <br><p></p> \n If &lt;number&gt; is not defined, defaults to 10 reviews.<br><p></p>\n (When filtering/limiting reviews, default sorting is by review id, from lowest to highest.)</td>\n </tr>\n \n <tr>\n <td class=\"\"></td>\n <td class=\"\">related_products:<br>\n <span class=\"indent1\">limit: &lt;number&gt;</span></td>\n <td class=\"\">\n[unlimited]</td>\n <td class=\"\">Displays products that are related by name.<br><p></p>\n \n &lt;number&gt; limits the number of products displayed.<br><p></p>\n \n If &lt;limit&gt; is absent or undefined, the default behavior is to display all related products.<br><p></p> \n\nInserting “limit:” with no integer will display 0 products. </td>\n </tr>\n \n <tr>\n <td class=\"\"></td>\n <td class=\"\">similar_by_views:<br>\n <span class=\"indent1\">limit: &lt;number&gt;</span></td>\n <td class=\"\">[unlimited]</td>\n <td class=\"\">Displays products similar to those displayed in the current page context.<br><p></p>\n \n &lt;number&gt; limits the number of products displayed.<br><p></p>\n \n If &lt;limit&gt; is absent or undefined, default is to display 4 products.</td>\n </tr>\n</table>\n\n\n<h2> <a name=\"Front-ref-brand\"></a>Brand Attributes</h2>\n\nBrand attributes are available in the context of a brand.<br><br>\n\n<table>\n <tr>\n <td>Attribute</td>\n <td>Option with Sample Assignment</td>\n <td>Default Value</td>\n <td>Details</td>\n </tr>\n <tr>\n <td class=\"\">brand:</td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n </tr>\n\n <tr>\n <td class=\"\"></td>\n <td class=\"\">products: <br>\n <span class=\"indent1\">limit: &lt;number&gt;</span></td>\n <td class=\"\">\n50</td>\n <td class=\"\">\nDefines the number of products displayed per page for this brand. Range of possible values is 1&ndash;50 products.</td>\n </tr>\n</table>\n\n\n<h2> <a name=\"Front-ref-brandlist\"></a>Brand List Attributes</h2>\n\nThese attributes are available in the context of a list of brands.<br><br>\n\n<table>\n <tr>\n <td>Attribute</td>\n <td>Option with Sample Assignment</td>\n <td>Default Value</td>\n <td>Details</td>\n </tr>\n <tr>\n <td class=\"\">brands:</td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\">(When retrieving a collection of brands, default sorting is by brand id, from lowest to highest.)</td>\n </tr>\n\n <tr>\n <td class=\"\"></td>\n <td class=\"\">limit: &lt;number&gt;</td>\n <td class=\"\">50</td>\n <td class=\"\">\nSets the number of brands displayed in the list. If &lt;limit&gt; is not defined, returns all brands, up to a maximum of 50.</td>\n </tr>\n</table>\n\n\n<h2> <a name=\"Front-ref-cart\"></a>Cart Attributes</h2>\n\nCart attributes are available in the context of a shopper's cart.<br><br>\n\n<table>\n <tr>\n <td>Attribute</td>\n <td>Sub-Attribute</td>\n <td>Option with Sample Assignment</td>\n <td>Default Value</td>\n <td>Details</td>\n </tr>\n <tr>\n <td class=\"\">cart</td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n </tr>\n <tr>\n <td class=\"\"></td>\n <td class=\"\">suggestions:</td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\">Suggested products to display to shopper, based on cart contents. <NOBR>(If enabled,</nobr> these suggestions appear only immediately after the shopper adds an item to the cart.)</td>\n </tr>\n <tr>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\">limit: &lt;number&gt;</td>\n <td class=\"\">null</td>\n <td class=\"\">null: Do not display suggested products.<br><p></p>\n&lt;number&gt; limits the number of suggested products to return.<br><p></p>\nIf &lt;number&gt; is not defined, returns 4 suggested products.</td>\n </tr>\n</table>\n\n\n<h2> <a name=\"Front-ref-search\"></a>Search Attributes</h2>\n\nSearch attributes are available in the context of a search results page.<br><br>\n\n<table>\n <tr>\n <td>Attribute</td>\n <td>Sub-Attribute</td>\n <td>Option with Sample Assignment</td>\n <td>Default Value</td>\n <td>Details</td>\n </tr>\n <tr>\n <td class=\"\">search</td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n </tr>\n <tr>\n <td class=\"\"></td>\n <td class=\"\">product_results:</td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\"></td>\n </tr>\n\n <tr>\n <td class=\"\"></td>\n <td class=\"\"></td>\n <td class=\"\">limit: &lt;number&gt;</td>\n <td class=\"\">16</td>\n <td class=\"\">\nDefines the number of product search results displayed per page. Range of possible values is 1&ndash;100 products.</td>\n </tr>\n</table>" } [/block]