2017 © Pedro PelĂĄez
 

yii2-extension yii2-crelish

Content management for the Yii2 framework

image

giantbits/yii2-crelish

Content management for the Yii2 framework

  • Tuesday, April 10, 2018
  • by sgudis
  • Repository
  • 2 Watchers
  • 1 Stars
  • 46 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 22 Versions
  • 5 % Grown

The README.md

yii2-crelish 0.4.8

Content management for the Yii2 framework., (*1)

Installation

  1. Create Yii2 Basic project
composer global require "fxp/composer-asset-plugin:^1.2.0"
composer create-project --prefer-dist yiisoft/yii2-app-basic {projectname}
  1. Install yii2-crelish
composer require giantbits/yii2-crelish

Setup

configuration

Edit your web.php config file, (*2)

// Add crelish to the bootstrap phase.
'bootstrap' => ['crelish', '...'],

// Configure components.
// Set default route.
'defaultRoute' => 'frontend/index',

// Configure view component to use twig.
'view' => [
  'class' => 'yii\web\View',
  'renderers' => [
    'twig' => [
      'class' => 'yii\twig\ViewRenderer',
      'cachePath' => '@runtime/Twig/cache',
      // Array of twig options:
      'options' => [
        'auto_reload' => true,
      ],
      'globals' => ['html' => '\yii\helpers\Html'],
      'uses' => ['yii\bootstrap']
    ],
  ]
]

// Enable file cache.
'cache' => [
  'class' => 'yii\caching\FileCache'
]

// Enable swift mailer.
'mailer' => [
  'class' => 'yii\swiftmailer\Mailer',
  'useFileTransport' => TRUE
]

// Use crelish user class
'user' => [
  'class'=>'giantbits\crelish\components\CrelishUser',
  'identityClass' => 'giantbits\crelish\components\CrelishUser',
  'enableAutoLogin' => true,
],

// Enable basic URL Manager.
'urlManager' => [
  'enablePrettyUrl' => TRUE,
  'showScriptName' => FALSE,
  'enableStrictParsing' => TRUE,
  'suffix' => '.html',
  'rules' => [
    // ...
  ]
]

// Finaly add Crelish to the config. (After component configuration)
$config['modules']['crelish'] = [
  'class' => 'giantbits\crelish\Module',
  'theme' => 'klangfarbe'
];

Setting up folders

Create the following structure in you project root folder., (*3)

workspace/
    data/
        *Create folders for evey content type you use.*
        asset/
            *Content items of this type are stored here.*
            2131123123123123.json
            ...
        page/
            *Content items of this type are stored here.*
            2131123123123123.json
            ...
    elements/
        *Definitions for each content type are stored here.*
        asset.json
        page.json
    widgets/

Important additions

Currently the system relies on two cintent types to b epresent. Paste the following code into the folder workspace/elements/., (*4)

// File name: asset.json

{
  "key": "asset",
  "label": "Asset",
  "selectable": false,
  "tabs": [
  ],
  "groups": [
  ],
  "fields": [
    { "label": "Title internal", "key": "systitle", "type": "textInput", "visibleInGrid": true, "rules": [["required"], ["string", {"max": 128}]]},
    { "label": "Title", "key": "title", "type": "textInput", "visibleInGrid": false, "rules": [["required"], ["string", {"max": 128}]]},
    { "label": "Description",  "key": "description", "type": "textInput", "visibleInGrid": false, "rules": [["required"],["string", {"max": 320}]]},
    { "label": "MIME-Type",  "key": "mime", "type": "textInput", "visibleInGrid": false, "rules": [["required"],["string", {"max": 128}]]},
    { "label": "Source",  "key": "src", "type": "textInput", "visibleInGrid": false, "rules": [["required"],["string", {"max": 256}]]},
    { "label": "Size",  "key": "size", "type": "textInput", "visibleInGrid": false, "rules": [["required"],["integer"]]},
    { "label": "Dominant color HEX",  "key": "colormain_hex", "type": "textInput", "visibleInGrid": false, "rules": [["safe"]]},
    { "label": "Dominant color RGB",  "key": "colormain_rgb", "type": "textInput", "visibleInGrid": false, "rules": [["safe"]]},
    { "label": "Color palette",  "key": "colorpalette", "type": "textInput", "visibleInGrid": false, "rules": [["safe"]]}
  ]
}

// File name: page.json

{
  "key": "page",
  "label": "Page",
  "tabs": [
    {
      "label": "Content",
      "key": "content",
      "groups": [
        {
          "label": "Content",
          "key": "content",
          "settings": {
            "width": "60"
          },
          "fields": [
            "displaytitle",
            "body",
            "matrix"
          ]
        },
        {
          "label": "Settings",
          "key": "settings",
          "settings": {
            "width": "40"
          },
          "fields": [
            "systitle",
            "navtitle",
            "metadescription",
            "metakeywords"
          ]
        }
      ]
    }
  ],
  "fields": [
    {
      "label": "Title internal",
      "key": "systitle",
      "type": "textInput",
      "visibleInGrid": true,
      "rules": [
        [
          "required"
        ],
        [
          "string",
          {
            "max": 128
          }
        ]
      ]
    },
    {
      "label": "Title display",
      "key": "displaytitle",
      "type": "textInput",
      "visibleInGrid": false,
      "rules": [
        [
          "required"
        ],
        [
          "string",
          {
            "max": 128
          }
        ]
      ]
    },
    {
      "label": "Title navigation",
      "key": "navtitle",
      "type": "textInput",
      "visibleInGrid": false,
      "rules": [
        [
          "required"
        ],
        [
          "string",
          {
            "max": 128
          }
        ]
      ]
    },
    {
      "label": "Meta-Description",
      "key": "metadescription",
      "type": "textInput",
      "visibleInGrid": false,
      "rules": [
        [
          "required"
        ],
        [
          "string",
          {
            "max": 128
          }
        ]
      ]
    },
    {
      "label": "Meta-Keywords",
      "key": "metakeywords",
      "type": "textInput",
      "visibleInGrid": false,
      "rules": [
        [
          "required"
        ],
        [
          "string",
          {
            "max": 128
          }
        ]
      ]
    },
    {
      "label": "Content",
      "key": "body",
      "type": "widget_\\yii\\redactor\\widgets\\Redactor",
      "visibleInGrid": false,
      "rules": [
        [
          "required"
        ],
        [
          "string",
          {
            "max": 2300
          }
        ]
      ]
    },
    {
      "label": "References",
      "key": "matrix",
      "type": "matrixConnector",
      "rules": [
        [
          "safe"
        ]
      ]
    }
  ]
}


The Versions

10/04 2018
07/02 2018

dev-master

9999999-dev

Content management for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis
by Stefan BĂ€chler

yii2 crelish cmp

09/10 2017

dev-develop

dev-develop

Content management for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis
by Stefan BĂ€chler

yii2 crelish cmp

28/04 2017

dev-feature/db-enhancement

dev-feature/db-enhancement

Content management for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis
by Stefan BĂ€chler

yii2 crelish cmp

22/04 2017

dev-database-support

dev-database-support

Content management for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis
by Stefan BĂ€chler

yii2 crelish cmp

19/04 2017

0.1.5

0.1.5.0

Content management for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis
by Stefan BĂ€chler

yii2 crelish cmp

18/04 2017

0.1.4

0.1.4.0

Content management for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis
by Stefan BĂ€chler

yii2 crelish cmp

11/11 2016

0.0.39

0.0.39.0

Content management for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis
by Stefan BĂ€chler

yii2 crelish cmp

30/10 2016

0.0.35

0.0.35.0

Content management for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis
by Stefan BĂ€chler

yii2 crelish cmp

30/10 2016

0.0.34

0.0.34.0

Content management for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis
by Stefan BĂ€chler

yii2 crelish cmp

30/10 2016

0.0.33

0.0.33.0

Content management for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis
by Stefan BĂ€chler

yii2 crelish cmp

30/10 2016

0.0.32

0.0.32.0

Content management for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis
by Stefan BĂ€chler

yii2 crelish cmp

29/10 2016

0.0.31

0.0.31.0

Content management for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis
by Stefan BĂ€chler

yii2 crelish cmp

25/10 2016

0.0.30

0.0.30.0

Content management for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis

yii2 crelish cmp

25/10 2016

0.0.29

0.0.29.0

Content management for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis

yii2 crelish cmp

25/10 2016

0.0.28

0.0.28.0

Content management for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis

yii2 crelish cmp

08/09 2016

0.0.24

0.0.24.0

Content management for the Yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis

yii2 crelish cmp

07/02 2016

0.0.9

0.0.9.0

Content management for the Yii framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis

yii2 crelish cmp

04/02 2016

0.0.8

0.0.8.0

Content management for the Yii framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis

yii2 crelish cmp

04/02 2016

0.0.7

0.0.7.0

Content management for the Yii framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis

yii2 crelish cmp

04/02 2016

0.0.6

0.0.6.0

Content management for the Yii framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis

yii2 crelish cmp

04/02 2016

0.0.4

0.0.4.0

Content management for the Yii framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Steffen Gudis

yii2 crelish cmp