---
title: Front-End
date: 2026-07-02T14:40:00+01:00
author: John Henry Donovan
canonical_url: "https://johnhenry.ie/plugins/bundle-builder/docs/guide/front-end"
section: Plugins
---
esc

↑↓ to navigate↵ to selectesc to close

Menu On this page 

- [Return to top](#)

Documentation

Documentation

# Front-End

If the bundle type has a [URI format and template](https://johnhenry.ie/plugins/bundle-builder/docs/getting-started/bundle-types), bundles get their own front-end page. The bundle is passed into the template as `bundle`:

```twig
<h1>{{ bundle.title }}</h1>
<p>{{ bundle.priceAsCurrency }}</p>

{% for component in bundle.getProducts() %}
  {{ component.product.title }} × {{ component.qty }}
{% endfor %}
```

See [Cart &amp; Variant Selection](https://johnhenry.ie/plugins/bundle-builder/docs/guide/cart-variant-selection) for the add-to-cart form.

## `craft.bundleBuilder`

The plugin adds a `craft.bundleBuilder` Twig variable.

### `bundles(criteria)`

Returns a bundle [element query](https://johnhenry.ie/plugins/bundle-builder/docs/api-reference/overview):

```twig
{% set featured = craft.bundleBuilder.bundles({
  type: 'bundles',
  limit: 4,
}).all() %}
```

### `getBundlesForProduct(product, criteria)`

Returns the (enabled) bundles a given product belongs to: handy for an "Also available in these bundles" block on a product page:

```twig
{% set bundles = craft.bundleBuilder.getBundlesForProduct(product) %}

{% for bundle in bundles %}
  <a href="{{ bundle.url }}">{{ bundle.title }}: {{ bundle.priceAsCurrency }}</a>
{% endfor %}
```

## **Element query**

Bundles can be queried like any element via `craft.bundleBuilder.bundles()`, supporting `type`, `typeId`, `postDate`, `expiryDate`, `status`, and the standard purchasable/element params.

On this page
