Skip to content Skip to sidebar Skip to footer

Django-cms Haystack Search - Placeholder Content

i have problem with results in django-cms and haystack search. I'm using django-cms-search plugin, haystack as backend. Haystack returns correct results. But i want to show 'teaser

Solution 1:

Haystack has templatetag higlight which creates "teaser" as i requested.

Template code can look like this:

{{ result.object.get_title }}
{% highlight result.text with request.GET.q max_lenght 40 %}
{{ result.object.get_absolute_url }}

Thanks to guys from #haystack IRC channel.

Post a Comment for "Django-cms Haystack Search - Placeholder Content"