PHPackages                             nattreid/cms - 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. [Framework](/categories/framework)
4. /
5. nattreid/cms

ActiveLibrary[Framework](/categories/framework)

nattreid/cms
============

CMS for Nette Framework

1.8.11(3y ago)4746[3 issues](https://github.com/nattreid/cms/issues)4MITJavaScriptPHP &gt;= 7.1

Since Jan 17Pushed 3y ago3 watchersCompare

[ Source](https://github.com/nattreid/cms)[ Packagist](https://packagist.org/packages/nattreid/cms)[ RSS](/packages/nattreid-cms/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (24)Versions (153)Used By (4)

CMS pro Nette Framework
=======================

[](#cms-pro-nette-framework)

Administrace webové aplikace

Nastaveni
---------

[](#nastaveni)

Zaregistrujte a nastavete extension v **config.neon**. Od namespace je odvozen název modulu pro další rozšíření administrace a to tak, že se k namespace přidá '*Ext*'

```
extensions:
    cms: NAttreid\Cms\DI\CmsExtension

cms:
    namespace: 'Cms'
    url: '/cms/'
    sender: 'Odesilatel '
    front: ':Front:Homepage:'

    disabled: false # vypnuti CRM

    configurator:
    	defaultPromenna: 'hodnota' # nastaveni vychozich hodnot v configuratoru

    fileManagerDir: %appDir%/../
    infoRefresh: 15 # vteriny

    minPasswordLength: 8
    passwordChars: '0-9a-zA-Z'

    loginExpiration: '20 minutes'
    sessionExpiration: '14 days'

    tracy:
        cookie: nejakyHash

    layout: '%appDir%/cms/templates/cms.latte' # hlavní šablona
```

a přidejte model do ORM. V příkladu je extension orm pod nazvem **orm**

```
orm:
    add:
        - NAttreid\Cms\Model\Orm
```

Pro přidání *assets* použijte

```
cms:
    assets:
        - %wwwDir%/js/example.js
        - %wwwDir%/css/example.css
        - {%wwwDir%/js/cs.js, locale: cs} # localizace pro cs
        - http://someUrt/scritp.js # remote
        - //someUrt/scritp.js # remote
        - {%wwwDir%/js/example.js, remote: true} # remote
        - {files: ["*.js", "*.css", "*.less"], from: %appDir%/cms}
```

Přídání dalších modulů

```
cms:
    menu:
        Example:
            link: 'Homepage:'
            web:
                test:
                    link: action                            # pokud je null, provede se default action
                    arguments: {name: value}                # argumenty
                    toBlank: TRUE                           # otevre do noveho okna
                    count: 5                                # pocet za linkem
                    # nebo
                    count: @SomeClass::countUnapproved()    # pocet za linkem
                    # nebo
                    count: {5, info}                        # muze byt info, warning (info je default)
```

Presenter musí dědit z třídy **\\NAttreid\\Cms\\Control\\ModulePresenter**. Příklad presenteru test z ukázky menu

```
namespace App\Cms\Example\Presenters;

class TestPresenter extends \NAttreid\Cms\Control\ModulePresenter {
    public function renderDefault() {
        // pro zobrazeni menu v mobilu (defaultne je skryto)
        $this->viewMobileMenu();

        // pridani tlacitka do Dockbaru
        $this['dockbar']->addLeftLink('tlacitko', 'link!');
        // nebo
        $this['dockbar']->addLeftLink('tlacitko')
            ->addClass('trida'); // spusteni pomoci javascriptu

        // tlacitko vpravo
        $this['dockbar']->addRightLink('tlacitko')
    }
}
```

**cms.latte**

```
{extends $layout}
```

Šablona **@layout.latte** pro modul musí dědit z *cms.latte*

Rozšiřitelnost pomocí extension
-------------------------------

[](#rozšiřitelnost-pomocí-extension)

Třída extension musí dědit z **\\NAttreid\\Cms\\DI\\ModuleExtension**

```
class ExampleExtension extends \NAttreid\Cms\DI\ModuleExtension {

    protected $namespace = 'example';
    protected $dir = __DIR__;
    protected $package = 'Package\\';

    public function beforeCompile() {
        parent::beforeCompile();
        $this->addLoaderFile('cestaKCssNeboJs');
        $this->addLoaderFile('cestaKLocalizovanemuJs','cs');
    }

}
```

a v složce musí být soubor **default.neon**

```
link: 'Homepage:'
position: 1

menu:
    group:
        test:
            link:
```

Presenter musí dědit z třídy **\\NAttreid\\Cms\\Control\\ModulePresenter**

```
namespace Package\Example\Presenters;

class TestPresenter extends \NAttreid\Cms\Control\ModulePresenter {

}
```

Nastavení pro presenteru CMS
----------------------------

[](#nastavení-pro-presenteru-cms)

Zaregistrujte službu, která bude implementovat z **\\NAttreid\\Cms\\ISettings**

```
class CmsSettings implements ISettings {

    public function init(\Nette\Application\UI\ITemplate $template, \NAttreid\Cms\Control\AbstractPresenter $presenter)
	{
		// php kod ...
	}
}
```

Další
-----

[](#další)

Přesměrování při AJAXovém volání v presenteru

```
$this->ajaxRedirect('link', ['args']);
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance5

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity76

Established project with proven stability

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

Recently: every ~112 days

Total

151

Last Release

1174d ago

PHP version history (3 changes)1.0.0PHP &gt;= 5.6

1.2.4PHP &gt;= 7.0

1.4.0PHP &gt;= 7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a388aeb3f00b15a3af1c1a5d3a2107c94af1730c6043dd30ce32a63f95ea290?d=identicon)[attreid](/maintainers/attreid)

### Embed Badge

![Health badge](/badges/nattreid-cms/health.svg)

```
[![Health](https://phpackages.com/badges/nattreid-cms/health.svg)](https://phpackages.com/packages/nattreid-cms)
```

PHPackages © 2026

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