How to use the teaser_text templatetag of cmsplugin-articles 0.2.2

70 views Asked by At

I'm making a site for which I use cmsplugin-articles 0.2.2. That means that there's a page on the site (News) which has nested child pages which are the news. In the parent page you view a list of news teasers. (This is the way the plugin works.)

Looking into the template of the article teaser that the plugin provides:

{% load article_tags i18n %}
<div class="article">
  {% block teaser_head %}
    <time datetime="{{ article|published_at|date:"Y-m-d" }}">{{ article|published_at|date:"d.m.Y" }}</time>
    <h2>{{ article|teaser_title }}</h2>
  {% endblock %}

  {% block teaser_body %}
    {% with article|teaser_image as image %}
      {% if image %}
        <img src="{{ image.url }}" />
      {% endif %}
    {% endwith %}
    <p>
        {% teaser_text article %}
        <a href="{{ article.get_absolute_url }}">{% trans "More" %}</a>
    </p>
  {% endblock %}
</div>

you can see the templatetag {% teaser_text article %} that should show some kind of text in the news teaser when rendering the News page.

I've published some news with some text for each one and when I go to the News page I can see the teasers list ok, but not any text, only the title, date, paginator and the "more" link, that proceed from other templatetags different than {% teaser_text %}.

Now the question is: does anybody knows how I can show each news text into each teaser (better an extract) when rendering the News page?

0

There are 0 answers