Thanks to all involved it is working!
index.html
{% include "teaser.html" %}
teaser.html
{% load page_teaser_tags keyword_tags mezzanine_tags i18n %}
{% page_teaser "about-us" as teased_page %}
{% if teased_page %}
<p>{{ teased_page.description|safe|truncatechars:50 }}</p>
{% endif %}
page_teaser_tags.py
from __future__ import unicode_literals
from mezzanine.pages.models import Page
from mezzanine import template
register = template.Library()
@register.as_tag
def page_teaser(slug=''):
"""
return the requested page
usage
{% page_teaser "about-us" as page_teased %}
"""
if slug:
try:
page = Page.objects.get(slug=slug)
return page
except page.DoesNotExist:
return None
return None
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.