PHPackages                             sy/bootstrap-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sy/bootstrap-cms

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sy/bootstrap-cms
================

Plugin for adding CMS feature

1.26.1(1mo ago)0358[6 issues](https://github.com/syframework/bootstrap-cms/issues)MITJavaScriptPHP &gt;=7

Since Apr 10Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/syframework/bootstrap-cms)[ Packagist](https://packagist.org/packages/sy/bootstrap-cms)[ RSS](/packages/sy-bootstrap-cms/feed)WikiDiscussions develop Synced 1mo ago

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

sy/bootstrap-cms
================

[](#sybootstrap-cms)

[sy/bootstrap](https://github.com/syframework/bootstrap) plugin for adding "CMS" feature in your [sy/project](https://github.com/syframework/project) based application.

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

[](#installation)

From your sy/project based application directory, run this command:

```
composer install-plugin cms
```

It's equivalent to:

```
composer require sy/bootstrap-cms
```

---

**NOTES**

The install-plugin command will do all these following steps:

1. Run composer require
2. Copy templates files
3. Create flyway migration file
4. Copy assets files
5. Run composer build
6. Run composer db migrate

---

Page methods
------------

[](#page-methods)

Create a method in your `Project\Application\Page` class (in `protected/src/Application/Page.php`):

```
	/**
	 * Content page
	 */
	public function contentAction() {
		$this->setContentVars([
			'CONTENT' => new \Sy\Bootstrap\Component\Cms\Content($this->get('id', 1)),
		]);
	}
```

Optionally, override the home page with the content page

```
	/**
	 * Home page
	 */
	public function homeAction() {
		$this->copy('content');
	}
```

Add URL converter in Application.php
------------------------------------

[](#add-url-converter-in-applicationphp)

In `protected/src/Application.php`

```
