Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-05-14 19:50:19

pbrienesse
Member
Registered: 2008-03-14
Posts: 10

Does search not look at sticky articles

Just a quick question I am hoping someone can answer. It would seem search does not look at the content or title of sticky articles when doing a search. Is there anyway to override this or include stickies in search. I have tried adding status to the article tag but it does not make a difference.

here is the code i am using for search

<txp:if_search> <txp:article status=“live, sticky” limit=“10” pgonly=“1”/> <txp:if_search_results> <p class=“result_count”><txp:search_result_count /> <txp:article status=“live, sticky” searchform=“search_results” limit=“10” /> <txp:newer><< Previous Results</txp:newer> <txp:older>More Results >></txp:older></p> <txp:else/> <p>No articles match your search criteria.</p> </txp:if_search_results>
</txp:if_search>

Offline

#2 2009-05-14 20:16:24

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Does search not look at sticky articles

Try adding searchsticky="1" to <txp:article/>.

Offline

#3 2009-05-15 19:31:48

pbrienesse
Member
Registered: 2008-03-14
Posts: 10

Re: Does search not look at sticky articles

That worked like a charm. Thanks very much i banged my head on this one for quite a while.

Offline

Board footer

Powered by FluxBB