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

Commit

Permalink
modification of content pages with createjs and schema.org vocabulary
Browse files Browse the repository at this point in the history
  • Loading branch information
adou600 committed Oct 18, 2012
1 parent a34418c commit 454b2ef
Show file tree
Hide file tree
Showing 13 changed files with 193 additions and 149 deletions.
13 changes: 10 additions & 3 deletions app/Resources/SymfonyCmfSimpleCmsBundle/views/Page/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@

{% block content %}

<div property="sioc:content">
{{ page.body|raw }}
{% createphp page as="rdf" %}
<div {{ createphp_attributes(rdf) }}>

<h2 {{ createphp_attributes( rdf.title ) }}>{{ createphp_content( rdf.title ) }}</h2>
<div {{ createphp_attributes( rdf.body|raw ) }} >
{{ createphp_content( rdf.body|raw ) }}
</div>

</div>
{% endcreatephp %}

{% endblock %}
{% endblock %}
8 changes: 4 additions & 4 deletions app/config/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
imports:
- { resource: parameters.yml.dist }
- { resource: parameters.yml }
- { resource: security.yml }

framework:
Expand Down Expand Up @@ -44,8 +44,8 @@ symfony_cmf_routing_extra:
symfony_cmf_simple_cms:
routing:
templates_by_class:
Cmf\MainBundle\Document\NewsDetail: CmfMainBundle:Cms:news_detail.html.twig
Symfony\Cmf\Bundle\SimpleCmsBundle\Document\Page: SymfonyCmfSimpleCmsBundle:Page:index.html.twig
Cmf\MainBundle\Document\NewsArticle: CmfMainBundle:Cms:news_detail.html.twig
Cmf\MainBundle\Document\WebPage: SymfonyCmfSimpleCmsBundle:Page:index.html.twig
use_sonata_admin: false

knp_menu:
Expand Down Expand Up @@ -76,4 +76,4 @@ fos_rest:
symfony_cmf_create:
phpcr_odm: true
map:
http://cmf.symfony.com/ns#NewsDetail: Cmf\MainBundle\Document\NewsDetail
http://schema.org/NewsArticle: Cmf\MainBundle\Document\NewsArticle
Loading

4 comments on commit 454b2ef

@adou600
Copy link
Member Author

Choose a reason for hiding this comment

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

There is currently no html editing with the aloha editor of CreateJs, which could be useful to deal with the html tables or html details for example. I wonder then how we deal with the page creation and edition. An interesting feature would be to have a Pages collection and be able to add pages from there. But in that case, what do we do with the fixtures?

@lsmith77
Copy link
Member

Choose a reason for hiding this comment

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

well the fixtures will go away once we had editing .. we just need to make sure we have backups :)

@dbu
Copy link
Member

@dbu dbu commented on 454b2ef Oct 22, 2012

Choose a reason for hiding this comment

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

excellent find with the schema.org types. we should add some of that doc into the createphp doc and the createbundle chapter of symfony-cmf-docs. and update the stuff in ContentBundle to be schema.org Article.

@dbu
Copy link
Member

@dbu dbu commented on 454b2ef Oct 22, 2012

Choose a reason for hiding this comment

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

Please sign in to comment.