Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Cms Bundle Laravel Package

chaplean/cms-bundle

View on GitHub
Deep Wiki
Context7

Getting Started With ChapleanCmsBundle

Prerequisites

This version of the bundle requires Symfony 2.8+.

Installation

Include ChapleanCmsBundle in composer.json

composer require chaplean/cms-bundle

Add bundle in AppKernel.php

<?php
    //...
    public function registerBundles()
    {
        return array (
            //...
            new Chaplean\Bundle\CmsBundle\ChapleanCmsBundle(),
        );
    }

Step:

Add configuration in config.yml
chaplean_cms:
    modules:
        block: boolean|array # Required, action available: ['add', 'remove']
        page: boolean|array # Required, action available: ['add', 'remove']
        post:
            category: boolean|array # Required, type available ['news', 'testimonial', 'video', 'zoom']
            action: boolean|array # Required, action available: ['add', 'duplicate', 'remove']
        media: boolean # Required
    template:
        back_layout: # Optional (default: 'ChapleanCmsBundle::layout-backoffice.html.twig'), for override default back layout (add a menu in sidebar for example)
        front_layout: # Required view extended by page/post view (example: 'ChapleanCmsBundle::layout-frontoffice.html.twig')
        front_route: # Optional (default: 'app_front'), route name for return to main site
        back_landing_route: # Optional (default: 'cms_back_home'), landing page to redirect to when requesting the backoffice without specific page
        logo_path: # Optional (default: ''), path of logo top left
        page_index: # Optional (default: 'ChapleanCmsBundle:Front/Page:index.html.twig'), Custom frontend page list
        page_view: # Optional (default: 'ChapleanCmsBundle:Front/Page:view.html.twig'), Custom frontend page
        post_index: # Optional (default: 'ChapleanCmsBundle:Front/Post:index.html.twig'), Custom frontend post list
        post_view: # Optional (default: 'ChapleanCmsBundle:Front/Post:view.html.twig'), Custom frontend post

[Notice]: front_layout must contain a block twig named content else see page_index, page_view, post_index, post_view if you want override default view for these modules.

Add ChapleanCmsBundle for doctrine
doctrine:
    orm:
        #...
        entity_managers:
            app:
                mappings:
                    mappings:
                        #...
                        ChapleanCmsBundle: ~
Add ChapleanCmsBundle for assetic
assetic:
    #...
    bundles: ['ChapleanCmsBundle']
Add route in routing.yml
chaplean_cms:
    resource: "@ChapleanCmsBundle/Resources/config/routing.yml"

chaplean_cms_rest:
    type: rest
    resource: "@ChapleanCmsBundle/Resources/config/routing_rest.yml"
    prefix:   /rest/
Add migration
<?php

// Add this in migration

/** @var Kernel $kernel */
$kernel = $this->container->get('kernel');
$application = new Application($kernel);
$application->setAutoExit(false);

$options = array('command' => 'doctrine:fixtures:load', '--fixtures' => 'vendor/chaplean/cms-bundle/Chaplean/Bundle/CmsBundle/DataFixtures/ORM', '--append' => true);
$application->run(new ArrayInput($options));

Build translations
php bin/console bazinga:js-translation:dump
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware