django-cms-search and placeholder content

138 views
Skip to first unread message

Jozef Mareš

unread,
Apr 9, 2012, 9:57:15 AM4/9/12
to django-cms...@googlegroups.com
Hello,

i have problem with search results in django-cms and haystack with django-cms-search app.

I'm using search this way:
 
{% for result in page.object_list %}
<div class="searchResults">
<h2>{{ result.object.get_title }}</h2>
       
<p><a href="{{ result.object.get_absolute_url }}">{% blocktrans %} Read more {% endblocktrans %}</a></p>
I want to access placeholder content to create "teaser" this way: 
{{ result.object.something }}

But i do not know how to get content of placeholder in results.

Is this possible?

Thanks,

Jozef

Luke Crooks

unread,
Apr 9, 2012, 10:27:35 AM4/9/12
to django-cms...@googlegroups.com

Result.Object.field and then render the placeholder as you normally would.

Jozef Mareš

unread,
Apr 9, 2012, 10:34:04 AM4/9/12
to django-cms...@googlegroups.com
Thanks for your reply Luke,

by field you mean database field?

Because I tried all DB fields there is no field which containt required text. There is only placeholders field which is many2many type.


Dne pondělí, 9. dubna 2012 15:57:15 UTC+2 Jozef Mareš napsal(a):
Dne pondělí, 9. dubna 2012 15:57:15 UTC+2 Jozef Mareš napsal(a):
Reply all
Reply to author
Forward
0 new messages