PHPackages                             fyrst/views-theme - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. fyrst/views-theme

ActiveShopware-platform-plugin[Templating &amp; Views](/categories/templating)

fyrst/views-theme
=================

ViewsTheme - Shopware 6 storefront theme

0.2.0(2w ago)03[7 issues](https://github.com/fyrst-digital/views-theme/issues)MITTwig

Since Aug 20Pushed 2w agoCompare

[ Source](https://github.com/fyrst-digital/views-theme)[ Packagist](https://packagist.org/packages/fyrst/views-theme)[ RSS](/packages/fyrst-views-theme/feed)WikiDiscussions next Synced 1w ago

READMEChangelog (3)Dependencies (2)Versions (3)Used By (0)

ViewsTheme
==========

[](#viewstheme)

A Shopware 6.7 storefront theme focused on high-fidelity ecommerce UI design.

Installation
------------

[](#installation)

Place the plugin in your Shopware installation under `custom/static-plugins/ViewsTheme`, then install and activate it:

```
bin/console plugin:install --activate ViewsTheme
```

Extended Theme configuration
----------------------------

[](#extended-theme-configuration)

- In `theme.json` you can set an `icons` property

Twig Extensions
---------------

[](#twig-extensions)

### `vi_define_classes`

[](#vi_define_classes)

Allows components to define default CSS classes while letting parent templates inject additional classes or completely override them.

#### Purpose

[](#purpose)

This function provides a consistent way to handle CSS class composition in reusable Twig components. It ensures that:

- Components always have their required base styles
- Parent templates can extend or override classes without messy string concatenation
- Class conflicts are resolved predictably through merge or replace strategies

#### Parameters

[](#parameters)

ParameterTypeDefaultDescription`defaultClasses``array`*required*Base class map with semantic keys (e.g., `main`, `inner`, `title`)`customClasses``array``[]`Incoming classes from a parent template`replace``bool``false`If `true`, replaces default classes; otherwise merges them#### Usage Example

[](#usage-example)

```
{# In your component template #}
{%
  set classes = vi_define_classes({
      main: [
          'd-grid',
          'flex-wrap',
      ],
  }, classes|default({}), replaceClasses|default(false))
%}

{% block component_header_main %}

{% endblock %}
```

When including this component from a parent template, you can pass custom classes:

```
{# Merge additional classes (default behavior) #}
{%
  sw_include '@Storefront/components/header/main.html.twig' with {
      classes: {
          main: ['custom-class', 'another-class']
      }
  }
%}

{# Result: class="d-grid flex-wrap custom-class another-class" #}

{# Completely replace default classes #}
{%
  sw_include '@Storefront/components/header/main.html.twig' with {
      classes: {
          main: ['custom-class']
      },
      replaceClasses: true
  }
%}

{# Result: class="custom-class" #}
```

#### Behavior

[](#behavior)

- **Merge mode** (`replace = false`, default): Uses `array_merge_recursive` to combine classes. Both default and custom classes are preserved.
- **Replace mode** (`replace = true`): Uses `array_replace_recursive` to override default classes with custom ones. If a key exists in both arrays, the custom value wins.

### `vi_attr_classes`

[](#vi_attr_classes)

Converts a class array into a clean, HTML-ready class string.

#### Purpose

[](#purpose-1)

Instead of writing `class="{{ classes.main|join(' ') }}"` in every template, this filter outputs the entire `class` attribute for you. It removes empty values, deduplicates classes, and handles the HTML attribute syntax.

#### Usage Example

[](#usage-example-1)

```
{# Before #}

{# After #}

```

Combined with `vi_define_classes`:

```
{%
  set classes = vi_define_classes({
      main: [
          'd-grid',
          'flex-wrap',
      ],
  }, classes|default({}), replaceClasses|default(false))
%}

```

#### Behavior

[](#behavior-1)

- Outputs the full `class="..."` attribute string
- Filters out empty, `null`, or `false` values
- Removes duplicate class names
- Returns an empty string (no attribute) if the input array is empty or `null`

### `vi_icon`

[](#vi_icon)

- todo: add description

Requirements
------------

[](#requirements)

- Shopware 6.7 (Core &amp; Storefront)

License
-------

[](#license)

MIT

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance96

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~274 days

Total

2

Last Release

19d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b991d3eb68e4612394c7b9a22b09aaf2ecc7b4990f3fb9b3d4cdef0cd135557?d=identicon)[robjke](/maintainers/robjke)

---

Top Contributors

[![ROBJkE](https://avatars.githubusercontent.com/u/26817419?v=4)](https://github.com/ROBJkE "ROBJkE (47 commits)")

### Embed Badge

![Health badge](/badges/fyrst-views-theme/health.svg)

```
[![Health](https://phpackages.com/badges/fyrst-views-theme/health.svg)](https://phpackages.com/packages/fyrst-views-theme)
```

###  Alternatives

[shopware/production

177202.8k](/packages/shopware-production)[adyen/adyen-shopware6

Official Shopware 6 Plugin to connect to Payment Service Provider Adyen

24115.8k](/packages/adyen-adyen-shopware6)[shopware/storefront

Storefront for Shopware

684.4M207](/packages/shopware-storefront)[unzerdev/shopware6

Unzer payment integration for Shopware 6

1230.4k](/packages/unzerdev-shopware6)[kiener/mollie-payments-plugin

Mollie Payments

6562.4k](/packages/kiener-mollie-payments-plugin)[frosh/tools

Provides some basic things for managing the Shopware Installation

83783.3k2](/packages/frosh-tools)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
