PHPackages                             markocupic/contao-collapsible-sidebar - 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. markocupic/contao-collapsible-sidebar

ActiveContao-bundle

markocupic/contao-collapsible-sidebar
=====================================

Add a collapsible sidebar to your Contao website.

1.0.3(3y ago)117GPL-3.0-or-laterPHPPHP ^8.0

Since Nov 20Pushed 3y ago1 watchersCompare

[ Source](https://github.com/markocupic/contao-collapsible-sidebar)[ Packagist](https://packagist.org/packages/markocupic/contao-collapsible-sidebar)[ RSS](/packages/markocupic-contao-collapsible-sidebar/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (8)Versions (5)Used By (0)

[![](docs/logo.png)](docs/logo.png)

Contao Collapsible Sidebar
==========================

[](#contao-collapsible-sidebar)

This extension for Contao CMS provides a collapsible sidebar.

[![Frontend](docs/frontend/screencast.gif)](docs/frontend/screencast.gif)

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

[](#installation)

Via Contao Manager or composer `require markocupic/contao-collapsible-sidebar`.

Configuration
-------------

[](#configuration)

### 1. Create the frontend module

[](#1-create-the-frontend-module)

Create a new frontend module of type **"Collapsible Sidebar"**. Do not forget to add a **CSS-ID** in the experts settings.

[![Frontend](docs/backend/tl_module.png)](docs/backend/tl_module.png)

### 2. Add the module to the layout

[](#2-add-the-module-to-the-layout)

Add the newly created module to your layout.

### 3. Customize the `mod_collapsible_sidebar.html.twig` template

[](#3-customize-the-mod_collapsible_sidebarhtmltwig-template)

Use the {{insert\_module}} or {{insert\_article}} insert tags to add more content. Save then customized template to the `templates/` folder.

### 4. Add a toggle button to the layout

[](#4-add-a-toggle-button-to-the-layout)

Add the "toggle sidebar" button to your layout using **TWIG include** or the provided **Contao Insert Tag**:

#### a) TWIG include

[](#a-twig-include)

```
set css_id = 'myCollapsibleSidebar'
{% include '@Contao/collapsible_sidebar_toggle' with {'aria_controls': css_id} %}

```

`{{collapsible_sidebar_toggle::##module_css_id##::##template_name##}}`. Enter the **CSS-ID** of the related **Collapsible Sidebar frontend module** as the first parameter =&gt; `{{collapsible_sidebar_toggle::myCollapsibleSidebar}}`. The second parameter ##template\_name## is optional. You can use it to create your own version of the toggle button template. See 4c!

#### b) Contao Insert Tag

[](#b-contao-insert-tag)

```
{{collapsible_sidebar_toggle::myCollapsibleSidebar}}

```

#### c) Create a custom toggle button

[](#c-create-a-custom-toggle-button)

Copy [collapsible\_sidebar\_toggle.html.twig](https://github.com/markocupic/contao-collapsible-sidebar/blob/main/contao/templates/collapsible_sidebar_toggle.html.twig), modify the content and save the file to the templates directory `templates/my_custom_collapsible_sidebar_toggle.html.twig`.

**TWIG**:

```
set css_id = 'myCollapsibleSidebar'
{% include '@Contao/my_custom_collapsible_sidebar_toggle' with {'aria_controls': css_id} %}

```

**Contao Insert Tag**:

```
{{collapsible_sidebar_toggle::myCollapsibleSidebar::my_custom_collapsible_sidebar_toggle}}

```

### 5. Use your own CSS to style the application

[](#5-use-your-own-css-to-style-the-application)

The extension is shipped with a very minimalistic stylesheet. To override the default CSS simply remove `{% do addCssResource('bundles/markocupiccontaocollapsiblesidebar/css/collapsible_sidebar.css') %}` in the head of your customized module template `/templates/mod_collapsible_sidebar.html.twig` and embed your own stylesheet.

### 6. Finally done!

[](#6-finally-done)

Use `composer install` or the Contao Manager to rebuild the cache.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

Total

4

Last Release

1267d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1525166?v=4)[Marko Cupic](/maintainers/markocupic)[@markocupic](https://github.com/markocupic)

---

Top Contributors

[![markocupic](https://avatars.githubusercontent.com/u/1525166?v=4)](https://github.com/markocupic "markocupic (8 commits)")

---

Tags

bundlecontaocollapsesidebar

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/markocupic-contao-collapsible-sidebar/health.svg)

```
[![Health](https://phpackages.com/badges/markocupic-contao-collapsible-sidebar/health.svg)](https://phpackages.com/packages/markocupic-contao-collapsible-sidebar)
```

###  Alternatives

[pdir/social-feed-bundle

Social feed extension for Contao CMS

1414.8k](/packages/pdir-social-feed-bundle)

PHPackages © 2026

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