TShirtShop will support the any-words and all-words search modes. We don??™t include the
exact-match search, because it??™s not really useful for our kind of web site. This decision leads
to the visual design of the search feature; see Figure 8-1.
Figure 8-1. The design of the search feature
The text box is there, as expected, along with a check box that allows the visitor to choose
between an all-words search and an any-words search.
You also need to decide how the search results are displayed. What should the search results
page look like? You want to display, after all, a list of products that match the search criteria.
The simplest solution to display the search results would be to reuse the products_list
componentized template you built in the previous chapter. A sample search page will look like
the one shown in Figure 8-2.
CHAPTER 8 ?– SEARCHING THE CATALOG 222
Figure 8-2. Sample search results
Figure 8-2 also shows the URLs used for search results pages. This is more a user optimization
than search engine optimization, because we??™ll restrict search engines from browsing
search result pages to avoid duplicate content problems. These URLs, however, can be easily
bookmarked by visitors and are easily hackable (the visitor can edit the URL in the address bar
manually)??”both details make the visitor??™s live browsing of your site more pleasant.
Pages:
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332