I recently followed some of the examples to fine tune the search results page. I should mention that I am much more of a designer than a coder.
Firstly, I was wondering if anyone out there knows how to tweak the code, to add a style to every situation in the results of the word that has been searched for. For example when you search for a word in google, in the results that are returned the word is styled in bold. Another example is in these forum searches, where the words appear highlighted. - I think this would add a lot to the search facility.
I also have another problem where for some reason line breaks are being inserted into some of my resulting paragraphs, but not ones that come from my blog pages. - I can not figure out what is causing this.
Also, if images or flash elements are at the top of the pages returned, fragments of these elements are appearing in the search results, and it would be great if there was an easy way to omit them, but I'm not sure how.
The code I am using for the Page_results.ss file is as follows:
<div class="typography">
<% if Results %>
<ul id="SearchResults">
<% control Results %>
<li>
<% if Content %>
$Content.FirstParagraph(html)
<% end_if %>
<a class="readMoreLink" href="$Link" title="Read more about "{$Title}"">Read more about "{$Title}"...</a>
</li>
<% end_control %>
</ul>
<% else %>
<p>Sorry, your search query did not return any results.</p>
<% end_if %>
<% if Results.MoreThanOnePage %>
<div id="PageNumbers">
<% if Results.NotLastPage %>
<a class="next" href="$Results.NextLink" title="View the next page">Next</a>
<% end_if %>
<% if Results.NotFirstPage %>
<a class="prev" href="$Results.PrevLink" title="View the previous page">Prev</a>
<% end_if %>
<span>
<% control Results.SummaryPagination(5) %>
<% if CurrentBool %>
$PageNum
<% else %>
<a href="$Link" title="View page number $PageNum">$PageNum</a>
<% end_if %>
<% end_control %>
</span>
</div>
<% end_if %>
</div>
Anyway, if anyone can help or point me in the right direction it would be much appreciated.
http://www.henryegloff.com.au