Introduction
The GSA Parametric Navigation is a feature that uses the XML output of the GSA, in combination with javascript, to provide a means to visually filter results based upon meta data.
Details
==> NOTE: Google does not warranty or in any way guarantee the reliability of this code. Use it at your own risk.
==> Miniumum Requirements:
- Parametric Navigation REQUIRES GSA v4.6.4.G70 or higher.
- JavaScript must be enabled on the users browser.
Changes Since v1.5:
- fixed issue with date searches where dates with a month of december were not treated as dates.
- added a clear all function in order to clear all selected parametric fields.
- modified code so that only parametric navigation cookies are selected.
- added the ability to limit the number of results to the number of hits in a parametric field.
- fixed issue with japanese and chinese characters in IE.
- added installation instructions for Google Mini.
- selection of values with international characters now work.
- fixed issue with parametric field names that contain non-alpha characters.
Changes Since v1.1:
- mTSetHost has been deprecated. The host name is automatically taken from the URL now.
- date value selections now work. Dates must be in the format of yyyy-mm-dd.
- parametric values are now always returned if they exist.
- selection of more than one parametric field is allowed.
- fixed selection of parametric values containing special characters (not including accented characters).
- added new function for setting titles for each parametric grouping.
- added highlighting for parametric selections.
Known Issues:
- does not work with japanese or chinese characters in FireFox.
The GSA Parametric Search is a feature that uses the XML output of the GSA, in combination with javascript, to provide a means to visually filter results based upon meta data.
Here is the data flow for the GSA Parametric Search:
1. Query is submitted to GSA
2. Results are returned and XSLT is applied
3. AJAX query for parametric search is submitted to GSA
4. XML is returned, parsed, and parametric results are displayed
Functions:
- mTAddField(metaTagName, metaTagDelimiter)
- metaTagName is the name of the meta tag to display.
- metaTagDelimiter is a delimiter that will be used to split up values into multiple values. An empty meta tag delimter indicates that the meta tag value is not to be split up.}
- mTSetDisplayName(metaTagName, metaTagDisplayName)
- metaTagname is the name of the meta tag that you wish to setup a label for.
- metTagDisplayName is the label value for the meta tag.
- mTCombineField(combineFrom, combineTo)
- combineFrom field is the name of the meta tag that you wish to take all the values from.
- combineTo field is the name of the meta tag that you wish to place all the values in.
- mTLoad(id, mTURL)
- the id is the div id in the xslt that the parametric results will be placed into.
- mTURL is the complete set of URL parameters that have to be passed to the javascript, in order to retain all the appropriate search criteria. If you are calling this from a GSA Frontend, then you will need to use the {$search_url} variable.
- mTSetHeader(headerName)
- the header name to display at the top of the parametric results.
- mTSetShowNumbers(show)
- whether or not to display the numbers beside each parametric value in a grouping.
- mTSetLimitNumbers(limit)
- whether or not to limit the results to the number of hits displayed beside each parametric field. This could result is missed results when a parametric value is selected.
- mTSetHost(hostName) ==> DEPRECATED
- The host name to do the parametric query on.
- mTSetShowNumbers(show)
- whether or not to display the numbers beside each parametric value in a grouping.
- mTSetClearAllName(clearAllName)
- clearAllName is the label for the link that is used to clear all the parametric cookies.
- mTSetExpandName(expandName)
- expandName is the label for the expand link.
- mTSetCollapseName(collapseName)
- collapseName is the label for the collapse link.
- mTSetMaxDisplay(maxDisplay)
- set the maximum number of meta data values to display for each of the meta data names.
- mTSort(metaTagName, sortBy)
- set the sort type and order for a specific meta tag name. Valid values for sortBy are: 'alpha asc', 'alpha desc', 'hits asc', and 'hits desc'.
- mTSetAllPlacement(allName, allLocation)
- allName is the label to be given to the all link.
- allLocation is the location to place the all link. It can be either header or list.
For the installation instructions, please see the Parametric Navigation Installation Instructions, which are based upon the version of the GSA that you are using.
To report any issues, or provide any feedback, please contact: fmackenz@gmail.com