dev-master
9999999-dev https://github.com/astina/AstinaSeoBundleAllows management of page title, meta description and meta keywords.
MIT
by Astina
Allows management of page title, meta description and meta keywords.
Allows management of page title, meta description and meta keywords., (*1)
"require" : { // ... "astina/seo-bundle":"dev-master", }
Enable the bundle in the kernel:, (*2)
``` php <?php // app/AppKernel.php, (*3)
public function registerBundles() { $bundles = array( // ... new Astina\Bundle\SeoBundle\AstinaSeoBundle(), ); }, (*4)
### Step 3: Load routing config Add routing if you want to be able to edit page meta data directly. ```yml astina_seo: resource: "@AstinaSeoBundle/Resources/config/routing.yml"
Warning: make sure to protect this URL in your app/config/security.yml, (*5)
Place {{ seo_meta_tags(app.request) }}
in your Twig template where you want the meta tags to be rendered., (*6)
Parameters:, (*7)
/** * @param \Symfony\Component\HttpFoundation\Request $request * @param string $defaultTitle * @param array $defaults * @param string $titleSuffix * @return string */ public function renderPageMetaTags(Request $request, $defaultTitle = null, array $defaults = array(), $titleSuffix = null)
The function tries to find a PageMetaData
entity for the current request and uses it to render the meta tags., (*8)
Configure global default values for title, description and keywords if needed:, (*9)
# app/config.yml astina_seo: global_defaults: title: "Foo App" description: "The greatest and bestest app in the internet" keywords: "greatest, bestest"
@todo: UI to create/delete PageMetaData
entitites., (*10)
Allows management of page title, meta description and meta keywords.
MIT