whatson-web/cms-bundle

Symfony - Whatson Web - CmsBundle

Installs: 442

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 1

Open Issues: 0

Type:symfony-bundle

dev-master 2017-10-02 12:25 UTC

This package is not auto-updated.

Last update: 2022-06-19 19:46:32 UTC


README

composer require whatson-web/cms-bundle dev-master

app/console wh:install:bundle cms

Ajouter les routes

bk_cms:
    resource: "@CmsBundle/Controller/Backend/"
    type:     annotation

Base configuration

wh_cms:
    templates:
        home:
            name: 'Accueil'
            frontView: 'CmsBundle:FrontEnd/Page:home.html.twig'
        page:
            name: 'Page normale'

Base configuration SEO

wh_seo:
    entities:
        CmsBundle\Entity\Page:
            urlFields:
                - {type: 'tree', entity: 'CmsBundle\Entity\Page', field: 'parent'}
                - {type: 'field', field: 'slug', suffix: '/'}
            defaultMetasFields:
                title: 'name'
                description: 'resume'

Ajouter l'onglet dans le menu admin

Ajouter le code suivant dans le fichier : src/BackendBundle/Menu/Menu.php

$menu->addChild(
	'pages',
	array(
		'label'  => $this->getLabel('sitemap', 'Pages'),
		'route'  => 'bk_cms_page_index',
		'extras' => array(
			'safe_label' => true,
		),
	)
);