Skip to content

Instantly share code, notes, and snippets.

@hatertron3000
Created October 5, 2019 22:29
Show Gist options
  • Save hatertron3000/b2e65d3488c230a22cce2feb2339d524 to your computer and use it in GitHub Desktop.
Save hatertron3000/b2e65d3488c230a22cce2feb2339d524 to your computer and use it in GitHub Desktop.
The custom category template that a JS custom pageClass module can use to retrieve the category page context and mount a frontend app.
---
category:
shop_by_price: true
products:
limit: {{theme_settings.categorypage_products_per_page}}
---
{{inject "categoryProductsPerPage" theme_settings.categorypage_products_per_page}}
{{#partial "head"}}
{{#if pagination.category.previous}}
<link rel="prev" href="{{pagination.category.previous}}">
{{/if}}
{{#if pagination.category.next}}
<link rel="next" href="{{pagination.category.next}}">
{{/if}}
{{/partial}}
{{#partial "page"}}
{{inject "category" category}}
<div id="root">Hello World!</div>
{{/partial}}
{{> layout/base}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment