PHPackages                             thelia/choice-filter-module - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. thelia/choice-filter-module

ActiveThelia-module[Utility &amp; Helpers](/categories/utility)

thelia/choice-filter-module
===========================

Allows the management of filters in front by template and category

2.1.1(3y ago)119.3k↑122.2%22LGPL-3.0+PHP

Since Sep 25Pushed 3y ago4 watchersCompare

[ Source](https://github.com/thelia-modules/ChoiceFilter)[ Packagist](https://packagist.org/packages/thelia/choice-filter-module)[ RSS](/packages/thelia-choice-filter-module/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (1)Versions (10)Used By (2)

Choice Filter
=============

[](#choice-filter)

This module allows the management of filters in front by template and category

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

[](#installation)

### Manually

[](#manually)

- Copy the module into `/local/modules/` directory and be sure that the name of the module is ChoiceFilter.
- Activate it in your thelia administration panel

### Composer

[](#composer)

Add it in your main thelia composer.json file

```
composer require thelia/choice-filter-module:~2.0.0

```

Usage
-----

[](#usage)

You can choose the position of the filters

- When you edit a template
- When you edit a category

Loop
----

[](#loop)

\[choice\_filter\]

### Input arguments

[](#input-arguments)

ArgumentDescription**template\_id**id of template**category\_id**id of category**order**`position` or `position_reverse`### Output arguments

[](#output-arguments)

VariableDescription**$TYPE**`feature` or `attribute` or other**$ID**id of filter**$POSITION**position of filter**$VISIBLE**visible of filter### Exemple

[](#exemple)

#### For a template

[](#for-a-template)

```
{loop name="choice_filter" type="choice_filter" template_id=$template_id}
    {if $TYPE == "feature" and $VISIBLE}
        {loop type="feature" name="feature-$ID" id=$ID}
            {* your code *}
        {/loop}
    {elseif $TYPE == "attribute" and $VISIBLE}
        {loop type="attribute" name="attribute-$ID" id=$ID}
            {* your code *}
        {/loop}
    {elseif $TYPE == "brand" and $VISIBLE}
        {* your code *}
    {elseif $TYPE == "price" and $VISIBLE}
        {* your code *}
    {/if}
{/loop}
```

#### For a category

[](#for-a-category)

```
{loop name="choice_filter" type="choice_filter" category_id=$category_id}
    {if $TYPE == "feature" and $VISIBLE}
        {loop type="feature" name="feature-$ID" id=$ID}
            {* your code *}
        {/loop}
    {elseif $TYPE == "attribute" and $VISIBLE}
        {loop type="attribute" name="attribute-$ID" id=$ID}
            {* your code *}
        {/loop}
    {elseif $TYPE == "brand" and $VISIBLE}
        {* your code *}
    {elseif $TYPE == "price" and $VISIBLE}
        {* your code *}
    {/if}
{/loop}
```

for performance, it is best to use a cache block

```
{cache key="choice-filter" ttl=600 category_id==$category_id}
    {loop name="choice_filter" type="choice_filter" category_id=$category_id}
        {if $TYPE == "feature" and $VISIBLE}
            {loop type="feature" name="feature-$ID" id=$ID}
                {* your code *}
            {/loop}
        {elseif $TYPE == "attribute" and $VISIBLE}
            {loop type="attribute" name="attribute-$ID" id=$ID}
                {* your code *}
            {/loop}
        {elseif $TYPE == "brand" and $VISIBLE}
            {* your code *}
        {elseif $TYPE == "price" and $VISIBLE}
            {* your code *}
        {/if}
    {/loop}
{/cache}
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~205 days

Recently: every ~138 days

Total

8

Last Release

1357d ago

Major Versions

0.1.2 → 1.0.02021-02-23

1.0.1 → 2.0.02021-07-21

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2196919?v=4)[thelia](/maintainers/thelia)[@thelia](https://github.com/thelia)

---

Top Contributors

[![gillesbourgeat](https://avatars.githubusercontent.com/u/7335734?v=4)](https://github.com/gillesbourgeat "gillesbourgeat (10 commits)")[![lopes-vincent](https://avatars.githubusercontent.com/u/6057206?v=4)](https://github.com/lopes-vincent "lopes-vincent (9 commits)")[![Lucanis](https://avatars.githubusercontent.com/u/6052481?v=4)](https://github.com/Lucanis "Lucanis (2 commits)")

### Embed Badge

![Health badge](/badges/thelia-choice-filter-module/health.svg)

```
[![Health](https://phpackages.com/badges/thelia-choice-filter-module/health.svg)](https://phpackages.com/packages/thelia-choice-filter-module)
```

PHPackages © 2026

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