Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-03-17 16:15:00

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 596
Website

No highlighting in search results?

<txp:if_search>
  <txp:article pgonly="1" limit="10" />
  <txp:if_search_results>
<h1 class="section-header">Search Results for "<txp:search_term />"</h1>
<txp:article limit="12" form="search_results" searchsticky="1" />
  <txp:else />
<h1 class="section-header">No Results Found for "<txp:search_term />"</h1>
    <h2>Please try again, or browse our website using the menu above.</h2>
  </txp:if_search_results>
</txp:if_search>

I’m not getting <strong> tags wrapped around search terms anymore. Any ideas why?

I checked the FAQ entry but didn’t see anything relevant.

Last edited by maruchan (2011-03-17 16:15:08)

Offline

#2 2011-03-17 17:14:31

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: No highlighting in search results?

<txp:search_result_excerpt /> is the tag that sets the <strong> highlight. (Default). It’s in the search_results form. Has something changed there?

Offline

#3 2011-03-17 18:56:50

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 596
Website

Re: No highlighting in search results?

Ah, thanks very much. For some reason I read that as “this will show the article’s excerpt with terms highlighted,” so I had it wrapped in if_excerpt with an “else” clause that just showed txp:body. And of course, no articles (yet) with actual excerpts in them. :D

Offline

#4 2011-03-17 19:00:06

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 596
Website

Re: No highlighting in search results?

I wonder why it won’t return certain words in an article? I have an article that says “trade and sales materials” and search results are only returning hits for “sales,” not “trade.”

Last edited by maruchan (2011-03-17 19:00:25)

Offline

Board footer

Powered by FluxBB