symfony-cmf / blog-bundle

ABANDONED - to focus our efforts, this bundle is no longer maintained
http://cmf.symfony.com
22 stars 31 forks source link

add rdf mapping for blog posts #39

Closed dbu closed 11 years ago

dbu commented 11 years ago
Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

this is a simple mapping for the blog post.

we could also change the template, but that would create a dependency on CreateBundle. this bundle probably should not provide a template anyways - the other bundles don't.

+{% createphp post as="rdf" %}
+
 <div class="row-fluid">
     <div class="span12">
-        <h1>{{ post.title }}</h1>
+        {{ rdf.title|raw }}
     </div>
 </div>
 <div class="row-fluid">
@@ -25,9 +28,11 @@
     </div>
 </div>
 <div class="row-fluid">
-    <div class="span12">
-        {{ post.body|nl2br|raw }}
+    <div class="span12" {{ createphp_attributes(rdf.body) }}>
+        {{ createphp_content(rdf.body)|nl2br|raw }}
     </div>
 </div>
+{% endcreatephp %}
lsmith77 commented 11 years ago

opened a follow up ticket for the template question