# Collection

Collection filters output or modifies content specific to the [collection object](/docs/theme/references/liquid/filters/collection) and its properties.

## within

`string | within: collection`

returns  [string](../basics/liquid-types#string)

Generates a product URL within the context of the provided collection.

**warning**

Because a standard product page and a product page in the context of a collection have the same content on separate URLs, you should consider the SEO implications of using the `within` filter.

**Code**

```liquid
{% assign collection_product = collection.products | first %}

{{ collection_product.url | within: collection }}
```

**Data**

```json
{
  "collection": {
    "products": [
      {
        "url": "/products/haldon-cashmere-crew"
      },
      {
        "url": "/products/ace-cashmere-beanie"
      }
    ]
  }
}
```

**Output**

```html
/collections/selling/products/ace-cashmere-beanie
```
