« creating footnotes with a list of URLs | Main | souping up MT search »

search templates that 'remember'

The standard MT templates include a search form on the main index of the blog that automatically limits the search to that blog (otherwise, mt-search.cgi will search all blogs that you haven't excluded in mt.cfg). But when the person does a new search from that page, mt-search.cgi doesn't "remember" the limitation to the one blog, so it searches all blogs.

To get around this problem, use the MTCgi plugin to grab the search parameters that were passed in the URL and use them again.

This is explained further at General Purpose Search Template. Note that the sample code given on this page is incorrect. When listing the parameters that you want to include it should say include="IncludeBlogs" not name="IncludeBlogs".

Inshallah, I'll explain a bit more about my search templates later.

Related

This tip is built on the following tip(s):

The following tip(s) expand on this tip:

This entry is about search. The ten most recent entries also about this topic are:

fast searches with PHP

more ways to soup up MT search

souping up MT search

View all entries about search.

About This Blog

  • Disclaimer: This is a personal site and is not connected with Six Apart, Ltd, the makers of Movable Type
  • Contact me:
  • Readme: What this blog is and is not
  • Reference: Templates for Al-Muhajabah's Islamic Blogs

August 2008

Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

Tips by Type

Tips by Area

Other ways to read this blog

Feed Subscribe to this blog's feed
(default is RSS 2.0, I also have RSS 1.0 and Atom)

Text-only version
Powered by
Movable Type 3.2