Created
June 11, 2013 17:39
-
-
Save sashainparis/5758984 to your computer and use it in GitHub Desktop.
Allow to use Create.js for Symfony/Cmf/BlogBundle.
Place the xml file in the Resources/rdf-mappings directory. Below is a example file template for the Post content.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <type | |
| xmlns:sioc="http://rdfs.org/sioc/ns#" | |
| xmlns:dcterms="http://purl.org/dc/terms/" | |
| xmlns:skos="http://www.w3.org/2004/02/skos/core#" | |
| typeof="sioc:Post" | |
| > | |
| <children> | |
| <property property="dcterms:title" identifier="title" tag-name="h1"/> | |
| <property property="sioc:content" identifier="body" /> | |
| </children> | |
| </type> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% extends "SymfonyCmfBlogBundle::default_layout.html.twig" %} | |
| {% block content %} | |
| {% createphp post as="rdf" %} | |
| <div {{ createphp_attributes(rdf) }}> | |
| <div class="row-fluid"> | |
| <div class="span6"> | |
| {% if prevPost %} | |
| <a href="{{ path(prevPost, {'slug': prevPost.slug}) }}"><< {{ prevPost.title }}</a> | |
| {% endif %} | |
| </div> | |
| <div class="span6" style="text-align: right"> | |
| {% if nextPost %} | |
| <a href="{{ path(nextPost, {'slug': nextPost.slug}) }}">{{ nextPost.title }} >></a> | |
| {% endif %} | |
| </div> | |
| </div> | |
| <div class="row-fluid"> | |
| <div class="span12"> | |
| <h1 {{ createphp_attributes( rdf.title ) }}>{{ createphp_content( rdf.title ) }}</h1> | |
| </div> | |
| </div> | |
| <div class="row-fluid"> | |
| <div class="span6"> | |
| <p><i>Posted on: {{ post.date.format('Y-m-d H:i:s') }}</i></p> | |
| </div> | |
| <div class="span6" style="text-align: right"> | |
| <i>{% trans from "SymfonyCmfSimpleCmsBundle" %}Tagged{% endtrans %}:</i> | |
| <i>{% include "SymfonyCmfBlogBundle:Blog:tags_inline.html.twig" %}</i> | |
| </div> | |
| </div> | |
| <div class="row-fluid"> | |
| <div class="span12" {{ createphp_attributes( rdf.body ) }}> | |
| <div {{ createphp_attributes( rdf.body ) }}>{{ createphp_content( rdf.body )|nl2br|raw }}</div> | |
| </div> | |
| </div> | |
| </div> | |
| {% endcreatephp %} | |
| {% endblock %} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment