Categories
The categories pages will display the list of categories.
Website URL: https://www.gofynd.com/categories
Argument
Context | Type | Description |
---|---|---|
categories | Object | Object of objects containing all the necessary details of all brands |
department | Object | department have information about logo, name,priority_order, slug, uid |
context.categories.data.items
This will be an array of objects. Each object will have all the details of a particular brand. You can use this data to render the UI as required.
Example
The below example will render the list of cards with brand details as required.
theme/templates/pages/categories.vue
<div className="brands-container" v-if="context.category.data.items && context.category.data.items.length">
<ul className="category-list" v-for="brand in context.category.items">
<li className="category-list__item" :key="brand.name">
<h2>{{brand.name}}</h2>
<img src="categorylogo.url"/>
</li>
...
</ul>
</div>