Skip to content
pkerspe edited this page Jan 12, 2015 · 11 revisions

#Welcome to the yii2-simple-cms wiki!

** yii2-simple-cms is still under development ** ** you can always checkout the latest version from github, yet it might not have all promoted features yet ** ** to be released by end of January 2015 **

#What is yii2 simple cms? A basic yii2 content management module for easily creating and maintaining a page structure, including navigation widget, full text search, image and document management and a wysiwyg html editor for the content pages.

Does NOT include an fine granulated access rights management, instead pages can only be set to three different states: visible, searchable/deeplinkable (not showing in navigation, yet could be found in search and accessed by direct links) and hidden.

The extensions supports site structures in multiple languages for international sites.

##Requirements

  • Yii2
  • PHP >=5.4.0
  • yiisoft/yii2-bootstrap
  • yiisoft/yii2-swiftmailer

simple cms uses the following third party assets:

yii\web\JqueryAsset

yii\jui\JuiAsset

yii\bootstrap\BootstrapAsset

yii\bootstrap\BootstrapPluginAsset

##Installation

installation is done by using composer. In you yii2 app root folder issue the following command on the console:

   php composer.phar require "schallschlucker/yii2-simple-cms"

or

   composer require "schallschlucker/yii2-simple-cms"

Then run the migration tool to create the needed database structures

php yii migrate/up --migrationPath=@schallschlucker/simplecms/migrations

##Usage

the extension is split into two modules: the frontend and the backend module.

Frontend provides the needed controllers to:

  • display page content
  • display documents
  • display a search form and a search result page

Widgets to:

  • render a navigation menu (extending yii\bootstrap\Nav widget)
  • render the navigation structure in different formats like a html list (ol or ul and li nodes), xml, json
  • render the search bar
  • render extended search form
  • render the search results list

The backend provides administrative functions for maintaining the page tree structure (including drag and drop functionality, keyboard shortcuts and context menus for easy creation of new pages).

Both modules can be deployed in the same application, but it is recommended to follow the frontend/backend approach to clearly separate the frontend (user view) from the administrative backend interface.

[php]
'components' => [
    ...
    'simplecmsLanguageManager' => [
        'class' => 'schallschlucker\simplecms\LanguageManager',
        'languageIdMappings' => [
		'1' => [
			'id' => 1,
			'code' => 'de',
			'displaytext' => [
					'de' => 'deutsch',
					'en' => 'german',
					'pl' => 'niemiecki',
					'tr' => 'alman',
			],
		],
		'de-DE' => [
			'alias' => '1'
		],
		'2' => [
			'id' => 2,
			'code' => 'en',
			'displaytext' => [
					'de' => 'englisch',
					'en' => 'english',
					'pl' => 'angielski',
					'tr' => 'ingilizce',
			],
		],
		'en-US' => [
			'alias' => '2',
		],
    ],
],
'modules' => [
    ...
        'cms_backend' => [
            'class' => 'schallschlucker\simplecms\Backend',
	    'languageManager' => 'simplecmsLanguageManager'
        ],
	'cms' => [
            'class' => 'schallschlucker\simplecms\Frontend',
	    'languageManager' => 'simplecmsLanguageManager'
        ],
	    
    ],
Clone this wiki locally