2017 © Pedro Peláez
 

symfony-bundle metabundle

Meta Bundle

image

mdespeuilles/metabundle

Meta Bundle

  • Thursday, December 7, 2017
  • by mdespeuilles
  • Repository
  • 1 Watchers
  • 1 Stars
  • 55 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

MetaBundle

SensioLabsInsight, (*1)

, (*2)

This bundle provides an easy way to set meta tag directly from the front. The principe is very simple. Just click on the "Meta" tab which appears on your front and set meta data for the page., (*3)

Installation

Step 1: Install with composer

To install MetaBundle with Composer just type in your terminal:, (*4)

php composer.phar require mdespeuilles/metabundle

Step 2: Register the bundle

Now update your AppKernel.php file, and register the new bundle:, (*5)

<?php

// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new Mdespeuilles\MetaBundle\MdespeuillesMetaBundle(),
    // ...
);

Step 3: Prepare the Web Assets of the Bundle

Execute the following command to make css and js assets available in your Symfony application:, (*6)

php bin/console assets:install --symlink

Step 4: Load the Routes for the Bundle

Load the routes of the bundle by adding this configuration at the very top of the app/config/routing.yml file:, (*7)

# app/config/routing.yml
mdespeuilles_meta:
    resource: "@MdespeuillesMetaBundle/Resources/config/routing.yml"
# ...

Step 5: Update your database

Update your shema with this command :, (*8)

php bin/console doctrine:schema:update --force

Step 6: Edit your application layout

Edit the layout call the meta form., (*9)

{{ render(controller('MdespeuillesMetaBundle:Meta:meta', {request: app.request})) }}
<script src="{{ asset('bundles/mdespeuillesmeta/js/meta.js') }}"></script>
<link rel="stylesheet" href="{{ asset('bundles/mdespeuillesmeta/css/meta.css') }}">

You should display this form only to granted roles you can simply add a condition to display it. For exemple :, (*10)

{% if is_granted('ROLE_SUPER_ADMIN') %}
    {{ render(controller('MdespeuillesMetaBundle:Meta:meta', {request: app.request})) }}
    <script src="{{ asset('bundles/mdespeuillesmeta/js/meta.js') }}"></script>
    <link rel="stylesheet" href="{{ asset('bundles/mdespeuillesmeta/css/meta.css') }}">
{% endif %}

Usage

Just click on the "Meta" tab which appears on your front and set meta data for the page., (*11)

The Versions

07/12 2017

dev-master

9999999-dev

Meta Bundle

  Sources   Download

MIT

The Requires

 

meta seo bundle

07/12 2017

1.0.5

1.0.5.0

Meta Bundle

  Sources   Download

MIT

The Requires

 

meta seo bundle

08/04 2017

1.0.4

1.0.4.0

Meta Bundle

  Sources   Download

MIT

The Requires

 

meta seo bundle

08/04 2017

1.0.3

1.0.3.0

Meta Bundle

  Sources   Download

MIT

The Requires

 

meta seo bundle

31/03 2017

1.0.2

1.0.2.0

Meta Bundle

  Sources   Download

MIT

The Requires

 

meta seo bundle

31/03 2017

1.0.0

1.0.0.0

Meta Bundle

  Sources   Download

MIT

The Requires

  • php >=7.0

 

meta seo bundle