Maybe there is a faster way...
Here is a nifty code snippet you can add to the 'Search Results' template of your Movable Type blog:
<mt:if tag="searchresultcount" eq="1">
<mt:SearchResults>
<script type="text/javascript">window.location="<mt:entrypermalink>";</script>
</mt:SearchResults>
</mt:if>
<mt:SearchResults>
<script type="text/javascript">window.location="<mt:entrypermalink>";</script>
</mt:SearchResults>
</mt:if>
The best place to add this is just before the normal <mt:searchresults> loop. Basically what this does is add a single line of javascript to the output in case there is only one search result. This line of code redirects the browser directly to the article in question. Try it out on this blog: look for 'bacon sandwich' using the search form up there, and you should find yourself back at this article!
Tweet
Leave a comment