Setup
Intended use
Backend - Cockpit
- Create a singleton
site
for your default page definitions. - Create a collection
pages
for all of your pages. - Create a collection
posts
for all of your blog posts. - Use the CpMultiplaneGUI addon.
Frontend - CpMultiplane
- create a child theme of rljbase or create your own theme
- adjust defaults in
/child-theme/config/config.php
- add snippets to
/child-theme/bootstrap.php
, that are explicitly for your theme - add snippets to
/config/bootstrap.php
, that are specifically for your setup - change some partials to fit your needs
Recommended Addons
Copy/install these addons into cockpit/addons/
.
- CpMultiplaneGUI
- adds a few fields to the sidebar, so you don't have to define them in your collection definitions
- some gui tweaks for easier access
- enable option to use settings profiles
- UniqueSlugs
- If urls should point to
/beautiful-heading
instead of/5f96fb606136312729000191
- for multilingual slugs in language switch
- If urls should point to
- rljUtils
- fixes security issues in Admin UI for multi user setups
- big language buttons for multilingual setups
- FormValidation
- The inbuilt Forms Controller requires field definitions from this addon
- The inbuilt views and css files are written to match the field definitions
- VideoLinkField
- inbuilt
/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 button
- inbuilt
- SimpleImageFixBlackBackgrounds
- replaces the SimpleImage library with a modified version to fix black backgrounds of transparent png and gif files on hosts with a non-bundled PHP GD version
- It works on the German webhoster Uberspace, but it doesn't work in the php7-apache docker image. So if you have problems with GD, this addon might be helpful.
- EditorFormats - if you want to give your users a Wysiwyg field
Settings
The 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',
],
];
Quickstart
cd ~/html
./mp multiplane/quickstart --template basic
Templates: minimal, basic, full
to do...
Collections
to do...
Pages
to do...
Subpages (posts)
to do...
Site Singleton
to do...
Profiles
to do...