Skip to main content

Categories

Deprecation Notice

Vue-based themes will soon be deprecated. Please switch to React-based themes, as all future updates and support will focus exclusively on React.

The categories pages will display the list of categories.

Website URL: https://www.gofynd.com/categories

QG11


Argument

ContextTypeDescription
categoriesObjectObject of objects containing all the necessary details of all brands
departmentObjectdepartment 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>

Was this section helpful?