Setting The Place Dictionary's Initial State With Get Parameters
<h3 class="heading-h6"><a name="THLToolboxhomegtDevelopersZonegtRubyOnRailsDevelopmentgtSettingthePlaceDictionarysInitialStatewithGETParameters" class="anchorpoint"></a><a href="/tools/wiki/home.html">THL Toolbox</a> > <a href="/tools/wiki/Developers%27%20Zone.html">Developers' Zone</a> > <a href="/tools/wiki/Ruby%20On%20Rails%20Development.html">Ruby On Rails Development</a> > Setting the Place Dictionary's Initial State with GET Parameters </h3><p class="paragraph">
</p><h3 class="heading-h1"><a name="SettingThePlaceDictionarysInitialStateWithGETParameters" class="anchorpoint"></a>Setting The Place Dictionary's Initial State With GET Parameters</h3><p class="paragraph"><strong class="bold">Contributor(s)</strong>: Tom Benner</p><p class="paragraph">The following GET parameters can be used to initialize the Place Dictionary's search results to show a specific search:</p><ul class="star"><li>filter - The text of the main search box</li>
<li>scope - Where the filter value should be looked for ("full_text", "name")</li>
<li>match - The type of match for filter ("contains", "begins", "exactly")</li>
<li>object_type - Feature type ID</li>
<li>characteristic_id - Characteristic ID</li>
<li>has_descriptions - When set to "1", only features with essays will be returned</li></ul><p class="paragraph">If you're having trouble finding any IDs (like feature type IDs), do the following:
</p><ol><li>Perform the search in the PD with the Firebug console active</li>
<li>Right-click on the new line in the console that begins with "POST" and select "Copy location with parameters"</li>
<li>Paste this into a text editor and look for the value of the parameter in question</li></ol><p class="paragraph">For example, the following URL would return features with feature type "" that have essays:
<img src="/" alt="external link: " title="external link"/><span class="nobr"><a href="http://places.thlib.org/?object_type=4555&has_descriptions=1" target="rwikiexternal">http://places.thlib.org/?object_type=4555&has_descriptions=1</a></span>
</p><h3 class="heading-h6"><a name="ProvidedforunrestrictedusebythespanclassnobrimgsrcsakairwikitoolimagesicklearrowgifaltexternallinktitleexternallinkahrefhttpwwwthliborgtargetrwikiexternalTibetanandHimalayanLibraryaspan" class="anchorpoint"></a><em class="italic">Provided for unrestricted use by the <span class="nobr"><img src="/" alt="external link: " title="external link"/><a href="http://www.thlib.org" target="rwikiexternal">Tibetan and Himalayan Library</a></span></em></h3>