Skip to content
This repository was archived by the owner on Dec 5, 2019. It is now read-only.

Commit 454b2ef

Browse files
committed
modification of content pages with createjs and schema.org vocabulary
1 parent a34418c commit 454b2ef

File tree

13 files changed

+193
-149
lines changed

13 files changed

+193
-149
lines changed

app/Resources/SymfonyCmfSimpleCmsBundle/views/Page/index.html.twig

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22

33
{% block content %}
44

5-
<div property="sioc:content">
6-
{{ page.body|raw }}
5+
{% createphp page as="rdf" %}
6+
<div {{ createphp_attributes(rdf) }}>
7+
8+
<h2 {{ createphp_attributes( rdf.title ) }}>{{ createphp_content( rdf.title ) }}</h2>
9+
<div {{ createphp_attributes( rdf.body|raw ) }} >
10+
{{ createphp_content( rdf.body|raw ) }}
11+
</div>
12+
713
</div>
14+
{% endcreatephp %}
815

9-
{% endblock %}
16+
{% endblock %}

app/config/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
imports:
2-
- { resource: parameters.yml.dist }
2+
- { resource: parameters.yml }
33
- { resource: security.yml }
44

55
framework:
@@ -44,8 +44,8 @@ symfony_cmf_routing_extra:
4444
symfony_cmf_simple_cms:
4545
routing:
4646
templates_by_class:
47-
Cmf\MainBundle\Document\NewsDetail: CmfMainBundle:Cms:news_detail.html.twig
48-
Symfony\Cmf\Bundle\SimpleCmsBundle\Document\Page: SymfonyCmfSimpleCmsBundle:Page:index.html.twig
47+
Cmf\MainBundle\Document\NewsArticle: CmfMainBundle:Cms:news_detail.html.twig
48+
Cmf\MainBundle\Document\WebPage: SymfonyCmfSimpleCmsBundle:Page:index.html.twig
4949
use_sonata_admin: false
5050

5151
knp_menu:
@@ -76,4 +76,4 @@ fos_rest:
7676
symfony_cmf_create:
7777
phpcr_odm: true
7878
map:
79-
http://cmf.symfony.com/ns#NewsDetail: Cmf\MainBundle\Document\NewsDetail
79+
http://schema.org/NewsArticle: Cmf\MainBundle\Document\NewsArticle

0 commit comments

Comments
 (0)