Download the PHP package swiegmann/kirby-alternate-templates without Composer
On this page you can find all versions of the php package swiegmann/kirby-alternate-templates. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download swiegmann/kirby-alternate-templates
More information about swiegmann/kirby-alternate-templates
Files in swiegmann/kirby-alternate-templates
Package kirby-alternate-templates
Short Description This Kirby CMS-Plugin applies custom templates based on slugs.
License MIT
Homepage https://github.com/swiegmann/kirby-alternate-templates
Informations about the package kirby-alternate-templates
Kirby Alternate Templates
This Kirby CMS-Plugin applies custom templates based on slugs.
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
Templateand may conflict with other plugins that do so
Prerequisites
- Kirby 4+
Installation
Download
Download and copy this repository to /site/plugins/kirby-alternate-templates.
Git submodule
Composer
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
Create a new template file with one of the following filenames to apply the template to
... exactly the slug:
e.g.: /site/templates/category--news.php.
You can always apply it to deeper slug-pathes:
e.g.: /site/templates/category--news--culture.php.
... the slug and all subpages of the same blueprint:
e.g.: site/templates/category--news--.php.
... exactly the slug for a specific language:
e.g.: site/templates/category--news--en.php.
... the slug and all subpages of the same blueprint for a specific language:
e.g.: site/templates/category--news--en--.php.
Global Configuration
Configure global settings in your config.php file:
| Option | Default | Type | Description |
|---|---|---|---|
enabled |
true |
bool | En-/Disable plugin |
License
MIT License Copyright © 2025-present swiegmann
All versions of kirby-alternate-templates with dependencies
getkirby/cms Version ^4.0
getkirby/composer-installer Version ^1.2