Creating Links to Pre-defined Search Criteria

Document Actions

If you are interested in providing your site users a link to a particular saerch criteria (for example, a particular industry or keyword), you can create links that use the search syntax directly. This document explains how you can create those links.

An example of how this could be used is shown for industry searches on this page

The directory searchResultPage template can be directly invoked to show certain set of businesses from a link or button. The url for setting the href link attribute, or action form attribute, should look like this:

http://directory_url/searchResultsPage?code=11111&bus_entire=keyword&page=n

After the ? character, you can put any of combination of the following options (separated by a &). Each option must be written as optionName=optionValue:

  • bus_entire to filter the results acording to business' name, description, prod/serv name, industry name.

Please remeber to use the correct syntax on this field. For references, please see ZCatalog Search Syntax. Please also have in mind that almost all non letter or digit character are not safe to put in url's.

  • code to order the results by distance to the given code.
  • page the result page to be displayed (where n is a number).
  • industry industry id, for business that have this industry set
  • country (only for world wide directories): country id.

For each searchable custom field that you want to include in the search (to filter even more the results), add the following pair to the above url:

customFieldName=on

Personal tools