PHPackages                             swiegmann/kirby-alternate-templates - 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. swiegmann/kirby-alternate-templates

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

swiegmann/kirby-alternate-templates
===================================

This Kirby CMS-Plugin applies custom templates based on slugs.

1.0.0(6mo ago)00MITPHPPHP &gt;=8.1.0 &lt;8.4.0

Since Nov 14Pushed 6mo agoCompare

[ Source](https://github.com/swiegmann/kirby-alternate-templates)[ Packagist](https://packagist.org/packages/swiegmann/kirby-alternate-templates)[ Docs](https://github.com/swiegmann/kirby-alternate-templates)[ RSS](/packages/swiegmann-kirby-alternate-templates/feed)WikiDiscussions main Synced 1mo ago

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

Kirby Alternate Templates
=========================

[](#kirby-alternate-templates)

This [Kirby CMS](https://www.getkirby.com)-Plugin applies custom templates based on slugs.

Summary
-------

[](#summary)

- Replaces any template for a given slug
- Supports descendant pathes
- Supports multilanguage-setups
- Advantages:
    - Affected pages still use the same blueprint, but you have control of the frontend output (aka "Art Direction") without content/data-changes in the backend
- Disadvantages:
    - In case of slug-changes the templates must be renamed according the current path
- **Disclaimer:** This plugin extends the core-class `Template` and may conflict with other plugins that do so

Prerequisites
-------------

[](#prerequisites)

- Kirby 4+

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

[](#installation)

### Download

[](#download)

Download and copy this repository to `/site/plugins/kirby-alternate-templates`.

### Git submodule

[](#git-submodule)

```
git submodule add https://github.com/swiegmann/kirby-alternate-templates.git site/plugins/kirby-alternate-templates

```

### Composer

[](#composer)

```
composer require swiegmann/kirby-alternate-templates

```

Use-Case
--------

[](#use-case)

You have a template-file, e.g. `/site/templates/category.php` and want to apply a custom template for a given slug, e.g. `domain.com/some-path/my-special-category` - but still keeping the same blueprint for the records.

Usage
-----

[](#usage)

### Create a new template file with one of the following filenames to apply the template to

[](#create-a-new-template-file-with-one-of-the-following-filenames-to-apply-the-template-to)

#### ... exactly the slug:

[](#-exactly-the-slug)

```
/site/templates/[template-name]--[slug].php

```

*e.g.: /site/templates/category--news.php*.

You can always apply it to deeper slug-pathes:

```
/site/templates/[template-name]--[slug]--[slug].php

```

*e.g.: /site/templates/category--news--culture.php.*

#### ... the slug and all subpages of the same blueprint:

[](#-the-slug-and-all-subpages-of-the-same-blueprint)

```
/site/templates/[template-name]--[slug]--.php

```

*e.g.: site/templates/category--news--.php*.

#### ... exactly the slug for a specific language:

[](#-exactly-the-slug-for-a-specific-language)

```
/site/templates/[template-name]--[slug]--[language-code].php

```

*e.g.: site/templates/category--news--en.php*.

#### ... the slug and all subpages of the same blueprint for a specific language:

[](#-the-slug-and-all-subpages-of-the-same-blueprint-for-a-specific-language)

```
/site/templates/[template-name]--[slug]--[language-code]--.php

```

*e.g.: site/templates/category--news--en--.php*.

Global Configuration
--------------------

[](#global-configuration)

Configure global settings in your `config.php` file:

```
return [
  'swiegmann.kirby-alternate-templates' => [
    'enabled' => true
  ]
];
```

OptionDefaultTypeDescription`enabled``true`boolEn-/Disable pluginLicense
-------

[](#license)

[MIT License](https://github.com/swiegmann/kirby-menu/blob/main/LICENSE) Copyright © 2025-present swiegmann

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance69

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

180d ago

### Community

Maintainers

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

---

Top Contributors

[![swiegmann](https://avatars.githubusercontent.com/u/39836887?v=4)](https://github.com/swiegmann "swiegmann (1 commits)")

---

Tags

kirby-cmskirby-pluginkirby4kirby5templateskirbykirby-plugin

### Embed Badge

![Health badge](/badges/swiegmann-kirby-alternate-templates/health.svg)

```
[![Health](https://phpackages.com/badges/swiegmann-kirby-alternate-templates/health.svg)](https://phpackages.com/packages/swiegmann-kirby-alternate-templates)
```

###  Alternatives

[getkirby/layouts

Kirby Layouts

428.4k](/packages/getkirby-layouts)[leitsch/kirby-blade

Enable Laravel Blade Template Engine for Kirby 4 and Kirby 5

219.2k](/packages/leitsch-kirby-blade)[oblik/kirby-link-field

Kirby 4 field for all types of links.

7650.6k2](/packages/oblik-kirby-link-field)[belugadigital/kirby-navigation

Kirby 5 field for hierarchical menus with drag &amp; drop level indentation.

8713.4k](/packages/belugadigital-kirby-navigation)[beebmx/kirby-blade

Blade template for Kirby

151.8k2](/packages/beebmx-kirby-blade)[tobimori/kirby-tailwind-merge

Tailwind Merge for Kirby CMS

276.3k](/packages/tobimori-kirby-tailwind-merge)

PHPackages © 2026

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