Addon to add frontend logic to the headless Cockpit CMS v1
 
 
 
 
Go to file
Raffael 25551ffbeb cleanup 2023-11-24 19:26:12 +01:00
Controller improved session handling 2023-11-23 12:51:40 +01:00
Helper improved search 2023-02-01 10:37:16 +01:00
assets cleanup 2023-02-04 11:41:27 +01:00
cli disabled broken/untested cli commands 2023-02-05 17:32:50 +01:00
lib moved Multiplane module into repo root 2023-01-13 14:24:12 +01:00
module improved session handling 2023-11-23 12:51:40 +01:00
views fixed js error forms settings 2023-02-10 10:46:44 +01:00
.gitignore update .gitignore 2023-01-13 14:23:15 +01:00
CHANGELOG.md bump version to 1.0.0-beta3 2023-11-23 12:58:33 +01:00
LICENSE restored deleted LICENSE file 2023-01-13 14:31:10 +01:00
README.md cleanup 2023-11-24 19:26:12 +01:00
admin.php refactored live preview 2023-01-17 19:07:05 +01:00
bootstrap.php bump version to 1.0.0-beta3 2023-11-23 12:58:33 +01:00
composer.json added composer.json 2023-01-13 14:33:39 +01:00
default-routes.php fixed `<unknown lang>/<route>` urls after refactoring 2023-01-30 15:21:26 +01:00
icon.svg renamed logo_clipped.svg to icon.svg 2023-01-13 18:11:37 +01:00
logo.svg moved Multiplane module into repo root 2023-01-13 14:24:12 +01:00
multiplane.php cleanup 2023-01-18 12:52:37 +01:00

README.md

Multiplane - Addon for Cockpit CMS v1

This addon is currently in a rewrite stage. Information below may not be accurate.

Main part of Multiplane to add frontend logic to the headless Cockpit CMS v1.

This addon should be installed as part of the multiplane/multiplane repository. See installation instructions over there.

Features

TODO: cleanup/update

  • pages and sub pages (e. g. posts)
  • multilingual with language prefix, e. g.: example.com/en/my-page
  • 2 modes for structured content
    • one collection per content type, e. g. a collection named pages and a collection named posts
    • a single collection named pages - each entry has a type page or post (experimental)
  • maintenance mode with option for allowed ips
  • simple content preview while editing pages
  • two basic responsive themes with scss files
  • simple privacy notice banner, that gets enabled when clicking on video link
  • contact forms - fully functional without javascript
  • pre-rendering of markdown fields
  • multiple ways to change everything
  • full-text search
  • sitemap
  • atom feeds (experimental)
  • ...

Requirements

  • PHP >= 8.0
  • PDO + SQLite (or MongoDB - not tested)
  • GD extension
  • pecl intl extension (optional)
  • mod_rewrite, mod_versions enabled (on apache)

Make also sure that $_SERVER['DOCUMENT_ROOT'] exists and is set correctly.

Installation

This addon should be installed as part of the multiplane/multiplane repository. See installation instructions over there.

Copy this repository into /addons and name it Multiplane or use the cli.

via git

cd path/to/cockpit
git clone https://codeberg.org/multiplane/cockpit-cms-Multiplane.git addons/Multiplane

via cp cli

cd path/to/cockpit
./cp install/addon --name Multiplane --url https://codeberg.org/multiplane/cockpit-cms-Multiplane/archive/main.zip

via composer

Make sure, that the path to cockpit addons is defined in your projects' composer.json file.

{
    "name": "my/cockpit-project",
    "extra": {
        "installer-paths": {
            "addons/{$name}": ["type:cockpit-module"]
        }
    }
}
cd path/to/cockpit-root
composer create-project --ignore-platform-reqs raffaelj/cockpit .
composer config extra.installer-paths.addons/{\$name} "type:cockpit-module"

composer require --ignore-platform-reqs multiplane/cockpit-cms-multiplane

Config

Create a profile, name it my-profile and set multiplane to the profile name.

Example config/config.php:

return [
    'app.name' => 'My app',

    // define Multiplane config via profile
    'multiplane' => [
        'profile' => 'my-profile',
    ],

    // content i18n
    'i18n' => 'en',
    'languages' => [
        'default' => 'English',
        'de' => 'Deutsch',
    ],

    // app i18n
    'babel' => [
        'languages' => [
            'de' => 'Deutsch',
            'fr' => 'Francais',
        ],
    ],
];

Reserved routes

TODO: cleanup/update

  • /login - Calling example.com/login reroutes to the admin folder, e. g. example.com/cockpit
  • /search - full-text search
  • /getImage - Calling /getImage?src=assets_id?w=100&h=100&m=thumbnail returns images/thumbnails with predefined settings, that can be adjusted with params
  • /submit/form_name and /form/form_name - for forms
  • /clearcache to clear cockpit's cache (only in debug mode)

Copyright 2019 Raffael Jesche under the MIT license.

See LICENSE for more information.

Credits and third party resources

Without Cockpit CMS, Multiplane couldn't exist. Thanks to Artur Heinze and to all contributors.