1. Go to this page and download the library: Download sy/bootstrap-cms library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sy / bootstrap-cms example snippets
/**
* Content page
*/
public function contentAction() {
$this->setContentVars([
'CONTENT' => new \Sy\Bootstrap\Component\Cms\Content($this->get('id', 1)),
]);
}
/**
* Home page
*/
public function homeAction() {
$this->copy('content');
}
namespace Project;
use Sy\Bootstrap\Lib\Url;
class Application extends \Sy\Bootstrap\Application {
protected function initUrlConverter() {
Url\AliasManager::setAliasFile(__DIR__ . '/../conf/alias.php');
Url::addConverter(new Url\AliasConverter());
Url::addConverter(new Url\ContentConverter()); // Add the content URL converter
Url::addConverter(new Url\ControllerActionConverter());
}
}
namespace Project\Application;
class Sitemap extends \Sy\Bootstrap\Application\Sitemap {
public function __construct() {
parent::__construct();
$this->addProvider(new \Sy\Bootstrap\Application\Sitemap\Page());
$this->addProvider(new \Sy\Bootstrap\Application\Sitemap\Content()); // Add the content sitemap
}
}
protected/src/Application/Page.php
protected/src/Application.php
protected/src/Application/Sitemap.php
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.