PHPackages                             kappa/themes-manager - 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. kappa/themes-manager

ActiveLibrary

kappa/themes-manager
====================

Package for easier work with themes

1407PHP

Since Jun 13Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Kappa-org/ThemesManager)[ Packagist](https://packagist.org/packages/kappa/themes-manager)[ RSS](/packages/kappa-themes-manager/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Kappa\\ThemesManager
====================

[](#kappathemesmanager)

Package for easier work with themes

Requirements:
-------------

[](#requirements)

- PHP 5.4 or higher
- [nette\\di](https://github.com/nette/di) 2.2 or higher
- [nette\\application](https://github.com/nette/application) 2.2 or higher

Installation:
-------------

[](#installation)

The best way to install Kappa\\ThemesManager is using Composer

```
$ composer require kappa/themes-manager:@dev
```

Usages
------

[](#usages)

First you must register extension

```
extensions:
	themes: Kappa\ThemesManager\DI\ThemesManagerExtension
```

Now you can configure templates for your application in config file

```
themes:
	themeName:
		themeDir: %wwwDir%/../../ # required
		assetsDir: :themeDir:/assets # required
		params:
			# params
		helpers:
			# helpers in format helperName: @service::method
		macros:
			# macros
		pathMasks:
			templates:
				# path masks for formatTemplateFiles
			layouts:
				# path masks for formatLayoutTemplateFiles
```

All settings will be used only in own section.

In masks you can use next placeholders:

- `:themeDir:` - contains theme dir path
- `:assetsDir:` - contains assets dir path for create temp copy into public directory. In templates now you can use `{$assetsDir}` variable as base path for scripts, styles and etc... files
- `:presenter:` - contains presenter name (without modules)
- `:modules:` - contains module name (module name My:Module will be replaced to My/Module)
- `:module_(number):` - contains module name (My:Module =&gt; module\_1 = My, module\_2 =&gt; Module)
- `:action:` - contains presenter acion name
- `:view:` - contains presenter view name
- `:themeName:` - will be replaced for theme name

In your presenter you can get template factory and file formats

Usages [kdyby/autowired](https://github.com/Kdyby/Autowired/), **it is recommended**

```
class BasePresenter extends Presenter
{
	use AutowireProperties;

	/**
	 * @var \Kappa\ThemesManager\Theme
	 * @autowire(admin, factory=\Kappa\ThemesManager\ThemeRegistry)
	 */
	public $theme;
```

or classic

```
class BasePresenter extends Presenter
{
	/** @var \Kappa\ThemesManager\ThemesRegistry @inject */
	public $themesRegistry;
```

Update template:

```
public function getTemplateFactory()
{
	$templateFactory = parent::createTemplate();
	// For kdyby/autowired
	$templateFactory->setTheme($this->theme);
	// Else
	$theme = $this->themesRegistry->getTheme('admin');
	$templateFactory->setTheme($theme);

    return $templateFactory;
}
```

now your presenter have macros, helpers and params from section 'themeName' defined in config file

Next you can use custom path masks. Example:

```
public function formatLayoutTemplateFiles()
{
    $list = $this->theme->getPathMapper()->getFormatLayoutTemplateFiles();

    return $list;
}

public function formatTemplateFiles()
{
    $list = $this->theme->getPathMapper()->getFormatTemplateFiles();

    return $list;
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c0840abca14f130b93d02cfa8412e99dc0645ca3f7e57cf75cfcb487efe33aa?d=identicon)[Budry](/maintainers/Budry)

---

Top Contributors

[![Budry](https://avatars.githubusercontent.com/u/990676?v=4)](https://github.com/Budry "Budry (115 commits)")

### Embed Badge

![Health badge](/badges/kappa-themes-manager/health.svg)

```
[![Health](https://phpackages.com/badges/kappa-themes-manager/health.svg)](https://phpackages.com/packages/kappa-themes-manager)
```

PHPackages © 2026

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