sunadarake/sculpin-category-list-bundle

3rd party Sculpin Bundle that creates category list

Installs: 10

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/sunadarake/sculpin-category-list-bundle

1.0.0 2021-03-13 08:30 UTC

This package is auto-updated.

Last update: 2025-10-13 18:58:03 UTC


README

3rd party Sculpin Bundle that creates category list

Setup

composer require sunadarake/sculpin-category-list-bundle

In your app/SculpinKernel.php

<?php

use Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel;
use Darake\SculpinCategoryListBundle\SculpinCategoryListBundle;

class SculpinKernel extends AbstractKernel
{
    protected function getAdditionalSculpinBundles(): array
    {
        return [
            SculpinCategoryListBundle::class,
        ];
    }
}

How to use

If you have configured taxonomy in app/config/sculpin_kernel.yml , you write the following in template file.

<h2>category list</h2>
<ul>
    {% for cat in site.categories_list %}
        <li>{{ cat.name }} {{ cat.count }}</li>
    {% endfor %}
</ul>

or

<h2>tag list</h2>
<ul>
    {% for tag in site.tags_list %}
        <li>{{ tag.name }} {{ tag.count }}</li>
    {% endfor %}
</ul>