> For the complete documentation index, see [llms.txt](https://documentation.siteglide.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.siteglide.com/ecommerce/get-started-ecommerce/cart-checkout-and-quotes/product-views/changing-detail-view-based-on-product-category.md).

# Dynamic Product Layouts based on Categories

Wondering how to adjust the Product Detail Page based on Category?

## Answer:

As a User navigates to your Product Detail Page, Siteglide will load the Detail View you have specified in your eCommerce Settings. However, it is perfectly possible to customise this based on [Categories](https://documentation.siteglide.com/cms/categories.md), using Liquid logic! You can read more about using Categories on the Layout of the WebApp or Module Item they belong to [here](https://documentation.siteglide.com/cms/categories/about/filtering-webapps-and-modules-by-categories.md).

In this example, you'd need to know the ID of a category you want to display; this can be found in Admin when you select a category. E.g. let's say we want to display something special when something has the category "Featured" and you know it has an ID of "111111":

```liquid
{% assign featured_id = "111111" %}
{% for category_id in this.category_array -%}
  {% if category_id == featured_id %}
    <!-- Add Featured Content Here -->
  {% endif %}
{% endfor %}
```
