> For the complete documentation index, see [llms.txt](https://docs.ecwid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ecwid.com/storefronts/open-page-on-the-storefront/open-category-pages-with-params.md).

# Open category pages with params

Base JS call:

```javascript
Ecwid.openPage('category');
```

List of additional parameters for the call:

* `'id'` - Category ID. If not specified, Ecwid will ignore any other params and open the main (root) category page (same as `'id': 0`).
* `'name'` - Category name as it would look in the URL: lowercase, spaces replaced with dashes. For example, the "Rental Spaces" category name would transform into `rental-spaces`.
* `'slug_value'` - Custom page slug for the category. Use it instead of the `name` parameter if a category has a custom slug.
* `'page'` - Page number for categories where products don't fit on one page. If you pass a value bigger than the number of pages in the category, Ecwid will open the last page.

{% hint style="info" %}
If you pass both `id` and `name` or `id` and `slug_value` parameters, Ecwid JS API will create a category URL and open it without making additional backend requests to confirm the category exists. The choice between the `name` or `slug_value` parameters depends on whether a category has a custom slug.
{% endhint %}

Code example:

```javascript
Ecwid.openPage('category', {'id': 20671017, slug_value: 'rental', 'page': 2});
```

You can also open the side menu with product filters on category pages with the `Ecwid.showProductFilters();` call.

Code example:

```javascript
Ecwid.openPage('category', 'id': 20671017);

Ecwid.showProductFilters();
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ecwid.com/storefronts/open-page-on-the-storefront/open-category-pages-with-params.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
