mssimi / content-management-bundle
Simple CMS
Installs: 1 768
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- doctrine/doctrine-bundle: ^1.6
- doctrine/doctrine-cache-bundle: ^1.2
- doctrine/orm: ^2.5
- doctrine/phpcr-bundle: ^1.3
- doctrine/phpcr-odm: ^1.4
- egeloen/ckeditor-bundle: ^5.0
- friendsofsymfony/jsrouting-bundle: ^1.6
- incenteev/composer-parameter-handler: ^2.0
- jackalope/jackalope-doctrine-dbal: 1.2.*
- knplabs/knp-menu-bundle: ^2.0
- knplabs/knp-paginator-bundle: ^2.5
- liip/imagine-bundle: ^1.7
- sensio/distribution-bundle: ^5.0
- sensio/framework-extra-bundle: ^3.0.2
- symfony/monolog-bundle: ^3.0.2
- symfony/polyfill-apcu: ^1.0
- symfony/swiftmailer-bundle: ^2.3.10
- symfony/symfony: ^3.0
- twig/twig: ^1.0||^2.0
- vich/uploader-bundle: ^1.5
Requires (Dev)
- phpstan/phpstan: ^0.7.0
- sensio/generator-bundle: ^3.0
- symfony/phpunit-bridge: ^3.0
Suggests
This package is auto-updated.
Last update: 2025-03-29 00:37:03 UTC
README
This bundle provides basic content management tools for your symfony project. You can integrate this bundle into your existing system to add CMS functionality or use it for simple websites.
Bundle implements following features:
- Blocks
- Menus
- Pages
- Blogs/Articles
- Slider(Slideshow)
Bundle contains CRUD actions as well as basic administration templates, which you can override (http://symfony.com/doc/current/templating/overriding.html). Bundle also provides simple "RouterController" for your pages.
Installation
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require mssimi/content-management-bundle
Bundle uses several other bundles you have to enable them in AppKernel.php
// app/AppKernel.php class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new mssimi\ContentManagementBundle\ContentManagementBundle(), new Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle(), new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(), new Knp\Bundle\MenuBundle\KnpMenuBundle(), new FOS\JsRoutingBundle\FOSJsRoutingBundle(), new Ivory\CKEditorBundle\IvoryCKEditorBundle(), new Vich\UploaderBundle\VichUploaderBundle(), new Liip\ImagineBundle\LiipImagineBundle(), ); } }
Routing - add this lines to your app/config/routing.yml. Warning!!! routing_page.yml must be very last!!!
content_management_admin: resource: "@ContentManagementBundle/Resources/config/routing_admin.yml" prefix: /admin/ _liip_imagine: resource: "@LiipImagineBundle/Resources/config/routing.xml" fos_js_routing: resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml" content_management_page: resource: "@ContentManagementBundle/Resources/config/routing_page.yml" prefix: /
Configuration
content_management: locales: ['en','de','fr'] items_per_page: 10 # item per page for pagination in admin articles_per_page: 20 # articles per page in blog pagination page_template: 'cms/page.html.twig' blog_template: 'cms/blog.html.twig' article_template: 'cms/article.html.twig' doctrine_phpcr: session: backend: type: doctrinedbal logging: true profiling: true workspace: default odm: auto_mapping: true auto_generate_proxy_classes: "%kernel.debug%" locales: en: [] de: [] fr: [] locale_fallback: hardcoded default_locale: en ivory_ck_editor: default_config: default configs: default: contentsCss: ['//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'] allowedContent: true autoParagraph: false entities: false vich_uploader: db_driver: orm mappings: content_management: uri_prefix: /images/cms upload_destination: '%kernel.root_dir%/../web/images/cms' db_driver: phpcr # filters used in admin, feel free to change config to fit your needs liip_imagine: resolvers: default: web_path: ~ filter_sets: cache: ~ thumbnail: quality: 75 filters: strip: ~ thumbnail: { size: [50, 50], mode: inset } slider: quality: 75 filters: strip: ~ thumbnail: { size: [1140, 560], mode: outbound }
For more info check these links
- http://symfony.com/doc/master/cmf/bundles/phpcr_odm/introduction.html
- https://github.com/egeloen/IvoryCKEditorBundle
- https://github.com/dustin10/VichUploaderBundle
- https://github.com/liip/LiipImagineBundle
Highly recommend bundle, if you want support for uploading images to your ckeditor
Enable caching is also higly recommended
Install assets
$ php bin/console asset:install
Init DB
$ php bin/console doctrine:phpcr:init:dbal $ php bin/console doctrine:phpcr:repository:init
If logged as user with ROLE_CMS, all blocks, menus, sliders will show quick edit button. Add this css file to your front base.html.twig or provide your own css for edit box.
<link rel="stylesheet" href="{{ asset('bundles/contentmanagement/css/edit.css') }}">