My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
ParametricNavigationInstallationMini  
Parametric Navigation Installation Instructions - version 1.5.4 (Google Mini)
Featured
Updated Feb 4, 2010 by fmack...@gmail.com

Introduction

This page contains the installation instructions for the Parametric Navigation for the Google Mini. All the appropriate files can be found in the zip file that is available in the downloads section.

Details

Installation Instructions:

==> NOTE: Google does not warranty or in any way guarantee the reliability of this code. Use it at your own risk.

==>NOTE: Before starting, it is important to use the parameter proxyreload=1 in your browser's URL line (for the search URL) in order to make sure that any changes to a stylesheet are reflected immediately.

Step 1

Create the following xsl template, where all other templates are defined, inside your xslt:

<xsl:template name="my_parametric_navigation">
  <span class="p">
    <xsl:text disable-output-escaping="yes"> &lt;!-- Please enter html code below. --&gt;</xsl:text>

 <!-- ********************************************************************** -->

  <div name="mtParametric" id="mtParametric"><font size="1"><br/><br/><br/><br/>
&#160;&#160;&#160;Loading parametric...</font></div>

 <!-- ********************************************************************** -->

  </span>
</xsl:template>

Step 2

In the "Global Style (do not customize" section, before the </xsl:comment> tag, put in the following lines:

<!-- ************************************************************* -->
<!-- CUSTOM : Parametric Navigation specific style
*************************** -->
div#metaclustering { font-size: 84%; line-height: 140%; float: right; width: 15em; margin: 1em 0 0 1em; padding-left: 1em; border-left: 1px solid #cccccc; }
div#metaclustering h3 { font-size: 100%; font-weight: bold; margin: 1.2em 0 0.6em 0; padding: 0; }
div#metaclustering ul { list-style: none; margin: 0; padding: 0; }
div#metaclustering li { margin-left: 2em; text-indent: -2em; }
#metacluster_message { color: #666666; }
<!-- ************************************************************* -->

Step 3

You must download an xmlhttp.js file from the internet. For example, I have fou nd it at the following location:

http://www.foto-group.com/xmlhttp/js/xmlhttp.js

You can also do a Google search and find it in a lot of other locations where you can easily download it, or create your own.

You then need to place the xmlhttp.js flie on some external machine, where it is accessable via a webserver. In the "Search results (do not customize)" section, right before the body tag, add the following include file:

<script language='javascript' src='http://some.machine.com/xmlhttp.js'>//Comment</script>

You must make sure that you change the above (some.machine.com/) with the URL that allows you to access the xmlhttp.js file that you have placed on the external machine.

Step 4

In the "Search results (do not customize)" section, right before the body tag, you can either include the googleParametric.js file as follows:

<!-- Parametric Navigation code start -->
 <script language='javascript' src='http://YOUR_HOST/googleParametric.js'>//Comment</script>
<!-- Parametric Navigation code end -->

You will also have to change YOUR_HOST to the host name where you have placed the googleParametric.js file.

OR

If you do not wish, or do not have an external machine to import the javascript code from, you must import the following file:

googleParametricInclude.txt

into your XSLT right before the body tag for the results page.

Step 5

Call mTLoad in the body onLoad portion of the XSLT similar to this:

<body onLoad="mTLoad('mtParametric', '{$search_url}', 1);" dir="ltr">

Step 6

Place any other parametric navigation function calls that are required, before the mTLoad statement.

NOTE: If you do not add in any mTAddField calls, then all the parametric fields and their values will be displayed. If you wish only specific parametric fields to be displayed, use the mTAddField function call, as follows:

// mTAddField(metaTagName, metaTagDelimiter);
mTAddField('keywords', ',');

If you wish to name the Label for a specific parametric field, then the mTSetDisplayName function will need to be used, as follows:

// mTSetDisplayName(metaTagName, metaTagLabel);
mTSetDisplayName('keywords', 'Keywords');

For more information on the list of available functions and their description, please see the parametric navigation documentation or the readme.txt file.

Step 7

Modify the following:

<!-- **********************************************************************
 Logo template (can be customized)
     ********************************************************************** -->
<xsl:template name="logo">
    <a href="{$home_url}"><img src="{$logo_url}"
      width="{$logo_width}" height="{$logo_height}"
      alt="Go to Google Home" border="0" /></a>
</xsl:template>

to:

<!-- **********************************************************************
 Logo template (can be customized)
     ********************************************************************** -->
<xsl:template name="logo">
    <a href="{$home_url}"><img src="{$logo_url}"
      width="{$logo_width}" height="{$logo_height}"
      alt="Go to Google Home" border="0" onClick="clearAllCookies()" /></a>
</xsl:template>

in order to make your logo clear all set parametric cookies.

Step 8

Call the my_parametric_navigation template:

<xsl:call-template name="my_parametric_navigation">
</xsl:call-template>

wherever you want to display the parametric navigation results.


Sign in to add a comment
Powered by Google Project Hosting