Setting The Place Dictionary's Initial State With Get Parameters

THL Toolbox > Developers' Zone > Ruby On Rails Development > Setting the Place Dictionary's Initial State with GET Parameters

Setting The Place Dictionary's Initial State With GET Parameters

Contributor(s): Tom Benner

The following GET parameters can be used to initialize the Place Dictionary's search results to show a specific search:

  • filter - The text of the main search box
  • scope - Where the filter value should be looked for ("full_text", "name")
  • match - The type of match for filter ("contains", "begins", "exactly")
  • object_type - Feature type ID
  • characteristic_id - Characteristic ID
  • has_descriptions - When set to "1", only features with essays will be returned

If you're having trouble finding any IDs (like feature type IDs), do the following:

  1. Perform the search in the PD with the Firebug console active
  2. Right-click on the new line in the console that begins with "POST" and select "Copy location with parameters"
  3. Paste this into a text editor and look for the value of the parameter in question

For example, the following URL would return features with feature type "" that have essays: external link: http://places.thlib.org/?object_type=4555&has_descriptions=1

Provided for unrestricted use by the external link: Tibetan and Himalayan Library