Rapido is a flexible CMS implementation built on top of Cockpit
- PHP >= 5.4
- PDO + SQLite
make also sure that
$_SERVER['DOCUMENT_ROOT']
exists and is set correctly. If you're running Apache you will also require mod_rewrite to be enabled.
- First download and extract the latest version of Rapido.
- Upload the files to your server.
- That's it. Tweak the .htaccess file if required.
You can override the default Rapido settings (and add your own custom settings) by editing config.php in the root Rapido directory. The config.php file lists all of the settings and their defaults. To override a setting simply uncomment it in config.php and set your custom value.
Rapido is a flat file CMS, this means there is no database to deal with. You simply create .php files in the "content" folder and that becomes a page.
If you created folder within the content folder (e.g. content/sub) and put an index.php inside it, you can access that folder at the URL http://yousite.com/sub. If you want another page within the sub folder, simply create a text file with the corresponding name (e.g. content/sub/page.php) and will be able to access it from the URL http://yousite.com/sub/page.
Below we've shown some examples of content locations and their corresponing URL's:
Physical Location | URL |
---|---|
content/index.php | / |
content/sub.php | /sub |
content/sub/page.php | /sub/page |
content/a/very/long/url.php | /a/very/long/url |
If a file cannot be found, the file themes/:theme/404.php will be shown.
View files are using the Lexy syntax. They can also contain regular HTML or PHP. At the top of text files you can place a meta block and specify certain attributes of the page. For example:
===
// modify title or layout, define scripts to load
title: Welcome
layout: otherlayout.php
scripts: ["path/to/style.css", "script.js"]
// custom data
key1: value1
key2: value2
===
These values will be contained in the $meta
variable in themes/views.
You can create themes for your Rapido installation in the "themes" folder. Check out the default theme for an example of a theme. Rapido uses Lexy for it's templating engine (inspired by Blade). You can select your theme by setting the theme
variable in config.php to your theme folder.
All themes must include a theme.php file to define the HTML structure of the theme, also a 404.php and 500.php file for the error layouts. Below are the Lexy variables/methods that are available to use in your theme:
- $base_url - access: base url
- $meta - access: $meta->title, $meta->layout, $meta->scripts, $meta->route
- @base('/url/to/file/based/to/basefolder')
- @route('/page/about')
- @snippet('snippetname')
- @render('/path/to/view')
- @thumbnail('/path/to/image.jpg', 100, 100)
- @region('regionname') - region managed by Cockpit
- @form('formname') - using Cockpit's form api
Help make Rapido better by checking out the GitHub repoistory and submitting pull requests. If you find a bug please report it on the issues page.