A small PHP front end for the fast and headless Cockpit CMS
926
A small PHP front end for the fast and headless Cockpit CMS.
Docs (work in progress), Demo (outdated), i18n
My main goals:
CpMultiplane is no classic Cockpit addon. It uses Cockpit as a library, registers multiplane as a new module and than uses cockpit's core features. The backend still works as a standalone tool to manage and structure data.
It is the refactored version of Monoplane, which is not maintained anymore.
Make also sure that $_SERVER['DOCUMENT_ROOT'] exists and is set correctly.
You can find the detailed version and a cli install example in docs - installation.md.
.htaccess.dist to .htaccesscockpitcd ~/html
git clone https://github.com/raffaelj/CpMultiplane.git .
cp .htaccess.dist .htaccess
git clone https://github.com/agentejo/cockpit.git cockpit
git clone https://github.com/raffaelj/cockpit_CpMultiplaneGUI.git cockpit/addons/CpMultiplaneGUI
git clone https://github.com/raffaelj/cockpit_FormValidation.git cockpit/addons/FormValidation
git clone https://github.com/raffaelj/cockpit_UniqueSlugs.git cockpit/addons/UniqueSlugs
cd ~/html
composer create-project --ignore-platform-reqs raffaelj/cpmultiplane .
If you use composer, Cockpit and the addons CpMultiplaneGUI, FormValidation and UniqueSlugs are installed automatically.
The docker image comes preinstalled with the quickstart routine of the "basic" template, with a default admin user (password: admin) and with dummy data from installed addons.
This is not meant for production use, but for local development.
docker pull raffaelj/cpmultiplane
docker run --rm -d --name cpmultiplane -p 8080:80 raffaelj/cpmultiplane
Now open your browser on localhost:8080 and see it in action.
example.com/en/my-pagepages and a collection named postspages - each entry has a type page or post (experimental)Install these addons in cockpit/addons/.
slug instead of _id/assets/js/mp.js, some views and css files are designed to load videos privacy friendly with a privacy notice, that pops up only when a user clicks a play buttonsite for your default page definitions.pages for all of your pages.posts for all of your blog posts./child-theme/config/config.php/child-theme/bootstrap.php, that are explicitly for your theme/config/bootstrap.php, that are specifically for your setupThe fastest way to change some defaults, is to add some values to /cockpit/config/config.php:
<?php
return [
'app.name' => 'CpMultiplane',
'i18n' => 'en',
'languages' => [
'default' => 'English',
'de' => 'Deutsch',
],
// define settings here
'multiplane' => [
'pages' => 'pages',
'siteSingleton' => 'site',
'slugName' => 'slug',
'use' => [
'collections' => [
'pages',
'posts',
'products',
],
'singletons' => [
'site',
],
'forms' => [
'contact',
],
],
],
];
The cleaner and more user friendly way is to use the GUI. Create a profile, name it my-profile and set multiplane to the profile name:
return [
'app.name' => 'CpMultiplane',
'i18n' => 'en',
'languages' => [
'default' => 'English',
'de' => 'Deutsch',
],
// define settings via profile
'multiplane' => [
'profile' => 'my-profile',
],
];
/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 contact forms/getPreview and /livePreview for content preview/clearcache to clear cockpit's cache (only in debug mode)Copyright 2019 Raffael Jesche under the MIT license.
See LICENSE for more information.
Without Cockpit, CpMultiplane couldn't exist. Thanks to Artur Heinze and to all contributors.
Content type
Image
Digest
sha256:0d4c56dd9…
Size
383.5 MB
Last updated
over 3 years ago
docker pull raffaelj/cpmultiplane