> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Category pages

> Show a single category of your catalog, combining Magento and Algolia features.

export const SearchQuery = () => <Tooltip tip="The text users enter into a search box. In the Search API, this corresponds to the query parameter. A search query is often used with filters, facets, and other parameters, but these aren't part of the query text itself.">
    search query
  </Tooltip>;

export const Records = () => <Tooltip tip="A record is a searchable object in an Algolia index. Each record consists of named attributes." cta="Algolia records" href="/doc/guides/sending-and-managing-data/prepare-your-data#algolia-records">
    records
  </Tooltip>;

export const Filter = () => <Tooltip tip="A filter is a condition that limits which records Algolia returns. Filters often use one or more facet-value pairs, such as brand:Apple AND color:red. You can also filter by numeric values, dates, tags, booleans, or geographic constraints." cta="Filtering" href="/doc/guides/managing-results/refine-results/faceting">
    filter
  </Tooltip>;

Category pages are pre-filtered product listing pages that show specific product selections.

<img src="https://mintcdn.com/algolia/6YAuCqOjAR64l9hZ/doc/integration/magento-2/guides/solutions-category-pages-ui.jpg?fit=max&auto=format&n=6YAuCqOjAR64l9hZ&q=85&s=79a24d600e8f948b8a2ae055763ec220" alt="The visual editor for category pages in the Algolia dashboard" width="1045" height="720" data-path="doc/integration/magento-2/guides/solutions-category-pages-ui.jpg" />

The Algolia extension lets you create category pages using InstantSearch widgets.
Choose from: price range, sorting, pagination, hierarchical menu, and <Filter /> widgets.

## Enable category pages

1. Go to **Stores > Configuration > Algolia Search > InstantSearch Results Page**.

   <img src="https://mintcdn.com/algolia/6YAuCqOjAR64l9hZ/doc/integration/magento-2/guides/solutions-category-pages-magento-setting.png?fit=max&auto=format&n=6YAuCqOjAR64l9hZ&q=85&s=50b3b5e57def52432a8d0e2634321b7d" alt="Screenshot of the Magento admin panel showing the 'Stores' menu with 'InstantSearch Results Page' highlighted under 'Algolia SEARCH' settings." width="2280" height="1250" data-path="doc/integration/magento-2/guides/solutions-category-pages-magento-setting.png" />

2. Set **Replace categories page** to **Yes**.

   <img src="https://mintcdn.com/algolia/6YAuCqOjAR64l9hZ/doc/integration/magento-2/guides/solutions-category-pages-magento-screen.png?fit=max&auto=format&n=6YAuCqOjAR64l9hZ&q=85&s=21f0821f92f9a2f660058e77c293567c" alt="Screenshot of the 'InstantSearch Results Page' configuration with the 'Replace categories page' drop-down menu set to 'Yes'." width="2978" height="1880" data-path="doc/integration/magento-2/guides/solutions-category-pages-magento-screen.png" />

After enabling category pages, the following happens:

* During indexing, Algolia adds a new `categoryId` attribute to each record.
  This attribute is an array containing the category page IDs for each product.
  You can use these page IDs to create [rules](/doc/guides/managing-results/rules/rules-overview) for pinning, hiding, boosting, or burying <Records />.

* InstantSearch widgets display the category pages.

* To display the category page, send an empty string as a <SearchQuery /> and the relevant categories as `facetFilters` in the frontend code.

<Info>
  If you want to use the API directly or build a custom frontend for your store,
  see [Category pages](/doc/guides/solutions/ecommerce/browse/tutorials/category-pages) for more information.
</Info>

## Algolia Rules

You can use Algolia Rules to change how records display in search results:

* [Pin records to the top of the search results](/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/promote-hits)
* [Hide records](/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/how-to-hide-hits)
* [Boost or bury search results](/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/how-to-promote-with-optional-filters)
* [Create banners](/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/add-banners)

## Further reading

* [Landing page builder](/doc/integration/magento-2/merchandising/landing-page-builder)
* [Category merchandising](/doc/integration/magento-2/merchandising/category-merchandising)
* [Merchandising studio](/doc/integration/magento-2/merchandising/merchandising-studio)
