Author: batiste.bieler
Date: Wed Mar 25 10:50:56 2009
New Revision: 417
Added:
wiki/DisplayContentInTemplates.wiki
Log:
Created wiki page through web user interface.
Added: wiki/DisplayContentInTemplates.wiki
==============================================================================
--- (empty file)
+++ wiki/DisplayContentInTemplates.wiki Wed Mar 25 10:50:56 2009
@@ -0,0 +1,45 @@
+#summary How to display page content in your templates
+
+Django page CMS provide several, ready to use, template tags
+
+==get_content==
+
+Store a content type from a page into a context variable that you can
reuse after.
+
+{{{
+{% get_content page_object "title" as content %}
+}}}
+
+You can also use the slug of a page
+
+{{{
+{% get_content "my-page-slug" "title" as content %}
+}}}
+
+==show_content==
+
+Output the content of a page directly within the template.
+
+{{{
+{% show_content page_object "title" %}
+}}}
+
+You can also use the slug of a page
+
+{{{
+{% show_content "my-page-slug" "title" %}
+}}}
+
+==show_absolute_url==
+
+Show the absolute url of a page in the right language
+
+{{{
+{% show_absolute_url page_object %}
+}}}
+
+Like the other template tags you can use the slug of a page
+
+{{{
+{% show_absolute_url "my-page-slug" %}
+}}}
\ No newline at end of file
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---