My favorites | Sign in
Logo
                
Search
for
Updated Dec 01, 2009 by batiste.bieler
DisplayContentInTemplates  
How to display page content in your templates

The documentation is now available here:

http://packages.python.org/django-page-cms/display-content.html


Comment by msn.mat, Jun 25, 2009

Can some mentioned of content.html be made on this page. I'd named one of my templates content.html and any use of show_content such as {% show_content page_object "title" %} recursively included the template!

Comment by msn.mat, Jun 25, 2009

When should one use a placeholder and when should one use show_content?

Comment by spowell...@yahoo.com, Jul 24, 2009

how do truncate the "body"?

Comment by chris.vigelius, Jul 25, 2009

to truncate the body you can use the builtin "truncatewords" (or the "truncatewords_html") filter. The following example will truncate the body after 100 words:

{% show_content current_page "body"|truncatewords:100 %}

Comment by spowell...@yahoo.com, Jul 27, 2009

{% show_content current_page "body"|truncatewords:100 %}- this method does not work.

Comment by spowell...@yahoo.com, Jul 27, 2009

My partner figured it out its

{% get_content dd "body" as content %}
{% autoescape off %} {{content|truncatewords_html:5}} {% endautoescape %}

Comment by dreglad, Sep 08, 2009

Don't you think the tags page_menu, page_sub_menu... and so on, should also allow "slug" as page parameter ?

Comment by pakhomovalex, Oct 14, 2009

Right! Slug would be right parameter here


Sign in to add a comment
Hosted by Google Code