whatson-web/blog-bundle

Symfony - Whatson Web - BlogBundle

Installs: 216

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Type:symfony-bundle

dev-master 2017-08-03 15:05 UTC

This package is not auto-updated.

Last update: 2022-06-21 13:10:08 UTC


README

Composer

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

app/console wh:install:bundle blog

Ajouter les routes

bk_blog:
    resource: "@BlogBundle/Controller/Backend/"
    type:     annotation

Base configuration SEO

wh_seo:
    entities:
        BlogBundle\Entity\Post:
            urlFields:
                - {type: 'field', field: 'page.url.url'}
                - {type: 'field', field: 'slug'}
            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(
	'posts',
	array(
		'label'  => $this->getLabel('globe', 'Actualités'),
		'route'  => 'bk_blog_post_index',
		'extras' => array(
			'safe_label' => true,
		),
	)
);