2017 © Pedro Peláez
 

yii2-extension yii2-localpages

Create local pages

image

shoxabbos/yii2-localpages

Create local pages

  • Wednesday, August 30, 2017
  • by shoxabbos
  • Repository
  • 1 Watchers
  • 1 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 7 Versions
  • 7 % Grown

The README.md

Create multi language static pages

Create multi language static pages, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist shoxabbos/yii2-localpages "*"

or add, (*4)

"shoxabbos/yii2-localpages": "*"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by :, (*6)

Run migrate, (*7)

php yii migrate --migrationPath=@vendor/shoxabbos/yii2-localpages/migrations

Add module to web/config, (*8)

'modules' => [
    'pages' => [
        'class' => '\shoxabbos\localpages\Module',
        'langs' => [
            'ru' => 'Russian',
            'en' => 'English',
        ],
        'defaultRoute' => 'page',
        'defaultLang' => 'ru',
        'layoutPath' => '@app/path/to/layouts',
        'layout' => 'admin',
        'pagesTableName' => 'pages',
        'pagesContentTableName' => 'page_contents',
    ],
]

Add action to your controller (viewFile: your view file for showing pages), (*9)

public function actions()
{
    return [
        'page' => [
            'class' => 'shoxabbos\localpages\actions\ViewAction',
            'viewFile' => 'page'
        ],
    ];
}

For add news: http://localhost:8080/pages/page/create, (*10)

For see created your post: http://localhost:8080/site/page?slug=test, (*11)

If you want a nice url you can set up the URL manager:, (*12)

'page/<slug:\w+>' => 'site/page'

After that, you can open the pages as:, (*13)

Before: ~~http://localhost:8080/site/page?slug=test~~, (*14)

After: http://localhost:8080/page/test, (*15)

The Versions

30/08 2017

dev-master

9999999-dev

Create local pages

  Sources   Download

MIT

The Requires

 

by Avatar shoxabbos

extension yii2 localpages

30/08 2017

v2.1.0

2.1.0.0

Create local pages

  Sources   Download

MIT

The Requires

 

by Avatar shoxabbos

extension yii2 localpages

29/08 2017

v2.0.1

2.0.1.0

Create local pages

  Sources   Download

MIT

The Requires

 

by Avatar shoxabbos

extension yii2 localpages

18/08 2017

v2.0

2.0.0.0

Create local pages

  Sources   Download

MIT

The Requires

 

by Avatar shoxabbos

extension yii2 localpages

18/08 2017

v1.2

1.2.0.0

Create local pages

  Sources   Download

MIT

The Requires

 

by Avatar shoxabbos

extension yii2 localpages

17/08 2017

v1.1

1.1.0.0

Create local pages

  Sources   Download

MIT

The Requires

 

by Avatar shoxabbos

extension yii2 localpages

16/08 2017

v1.0

1.0.0.0

Create local pages

  Sources   Download

MIT

The Requires

 

by Avatar shoxabbos

extension yii2 localpages