PHPackages                             silvercommerce/complex-category - 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. silvercommerce/complex-category

ActiveSilverstripe-vendormodule

silvercommerce/complex-category
===============================

Categories that allow more complex frontent functionality (such as sorting and selection of page length)

1.2.0(3y ago)04511BSD-3-ClausePHPCI failing

Since Aug 12Pushed 3y ago3 watchersCompare

[ Source](https://github.com/silvercommerce/complex-category)[ Packagist](https://packagist.org/packages/silvercommerce/complex-category)[ Docs](http://github.com/silvercommerce/complex-category)[ RSS](/packages/silvercommerce-complex-category/feed)WikiDiscussions 1 Synced 3d ago

READMEChangelogDependencies (3)Versions (9)Used By (0)

Complex Category
================

[](#complex-category)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b1f236daa39ace581024c4a7a0b1389894bba24c2f87210a05d8db82633c4396/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73696c766572636f6d6d657263652f636f6d706c65782d63617465676f72792f6261646765732f7175616c6974792d73636f72652e706e673f623d312e30)](https://scrutinizer-ci.com/g/silvercommerce/complex-category/?branch=1.0)

Category that allows sorting of products and selecting pagination length

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

[](#installation)

Install this module using composer

```
composer require silvercommerce/complex-category

```

Usage
-----

[](#usage)

This module adds a new category type called "Complex Category" that you can add via the admin interface. These categories allow you to add a `SortLimitForm`that will add "sort" and "show" dropdowns and automatically update the product list.

Add Form to Template
--------------------

[](#add-form-to-template)

This module requires you to add a `$SortLimitForm` variable to your category templates.

You can add this to all category templates, or specify a specific template for your complex category.

Customising sort and page length options
----------------------------------------

[](#customising-sort-and-page-length-options)

You can add custom sort and page length options via SilverStripe config. The config options are as follows.

### ComplexCategoryController.sort\_options

[](#complexcategorycontrollersort_options)

An array of sort options, where the key is the sort (which is loaded into the `DataList::sort()`call) and the value is what is loaded in the dropdown.

If you wanted to add a "Date Added" field to the sort, you could add the following to your `config.yml`

```
ComplexCategoryController:
  sort_options:
    "Created ASC": "Added (most recent first)"
    "Created DESC": "Added (oldest first)"
```

### ComplexCategoryController.show\_options

[](#complexcategorycontrollershow_options)

An array of page length options, where the key is the length (used by `PaginatedList::setPageLength()`)and the value is what is loaded in the dropdown.

If you wanted to add 120 and 150 to the field, you could add the following to your `config.yml`

```
ComplexCategoryController:
  show_options:
    "120": "120"
    "150": "150"
```

**NOTE:** To attempt to help protect against attacks such as SQL injection, none of the above pass queries are passed via the URL, instead a index of the selected option is passed and then the controller selects the appropriate setting.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 95% 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 ~205 days

Recently: every ~236 days

Total

9

Last Release

1188d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c7d4998767cb41bf0048a65158559384fbab33751b26c996d6367019c68c4f8b?d=identicon)[DFT](/maintainers/DFT)

---

Top Contributors

[![mlewis-everley](https://avatars.githubusercontent.com/u/687143?v=4)](https://github.com/mlewis-everley "mlewis-everley (19 commits)")[![Makreig](https://avatars.githubusercontent.com/u/6011781?v=4)](https://github.com/Makreig "Makreig (1 commits)")

---

Tags

paginationsilverstripesortecommerceproductcategorycommerce

### Embed Badge

![Health badge](/badges/silvercommerce-complex-category/health.svg)

```
[![Health](https://phpackages.com/badges/silvercommerce-complex-category/health.svg)](https://phpackages.com/packages/silvercommerce-complex-category)
```

PHPackages © 2026

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