Skip to content
This repository was archived by the owner on Dec 5, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ public function registerBundles()
new Symfony\Cmf\Bundle\BlockBundle\CmfBlockBundle(),
new Symfony\Cmf\Bundle\CoreBundle\CmfCoreBundle(),
new Symfony\Cmf\Bundle\SimpleCmsBundle\CmfSimpleCmsBundle(),
new Symfony\Cmf\Bundle\SeoBundle\CmfSeoBundle(),

// dependency of the block bundle
new Sonata\BlockBundle\SonataBlockBundle(),
new Sonata\SeoBundle\SonataSeoBundle(),


// and the website specific bundle
new Cmf\MainBundle\CmfMainBundle(),
Expand Down
12 changes: 12 additions & 0 deletions app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ cmf_menu:
voters:
uri_prefix: true

cmf_seo:
title: %%content_title%% | Symfony2 CMF
description: The Symfony2 Content Management Framework. %%content_description%%
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For content that is seo aware and serve values for description or title you can adjust that standard config.
For multilang support you can set translation keys instead (default translation_domain: messages, can be changed)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the website is single lang only


doctrine_cache:
providers:
phpcr_meta:
Expand All @@ -76,3 +80,11 @@ fos_rest:

sonata_block:
default_context: [cms]

sonata_seo:
page:
title: Symfony2 CMF
metas:
name:
description: The Symfony2 Content Management Framework
keywords: "CMF, Symfony2, PHPCR"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all content that isn't seo aware atm, use that default configuration. The Title will be extracted from all content that has a getTitle() method, so that one will work for all documents in the webside.

1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"symfony-cmf/content-bundle": "1.1.*@dev",
"symfony-cmf/menu-bundle": "1.1.*@dev",
"symfony-cmf/simple-cms-bundle": "1.1.*@dev",
"symfony-cmf/seo-bundle": "1.0.*@dev",
"friendsofsymfony/rest-bundle": "~1.0",
"jms/serializer-bundle": ">=0.12,<0.14",
"jackalope/jackalope-doctrine-dbal": "1.1.*",
Expand Down
197 changes: 191 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/Cmf/MainBundle/Resources/views/layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>{% block title %}{{ title|default('Welcome')|striptags }}{% endblock %} | Symfony2 CMF</title>
{{ sonata_seo_metadatas() }}
{{ sonata_seo_link_canonical() }}
{{ sonata_seo_lang_alternates() }}
{{ sonata_seo_title() }}

{% block includes %}
<link href="{{ asset('bundles/cmfmain/css/style.css') }}" type="text/css" rel="stylesheet"/>
Expand Down