 |
» |
|
|
 |
First Steps To Construct a Contextual Site Search for Your
Web Section
- Ensure that your web section is registered in the HP.com Web Publishing Interface. Please note that search will not start the process to include your web section into search until your web section has been approved to "go live" by the Compliance team. You must complete the Web Standards and Accessibility self-assessments to gain this approval. Please make sure that the contact information for your section in the Publishing Interface is up-to-date so the search team can contact you if necessary. You can check on your web section's indexing status within the Update\Verify Your Web Section Profile selector in the Publishing Interface.
- Read through the rest of the technical information on this page and set up the Contextual Site Search manually or use the Search Builder
on the bottom of this page to set it up using a Graphic User Interface (GUI) environment. For SNF+ users, This documentation contains a special section
which provides instructions on how to configure search directly in the SNF+ application.
- Let us know that you're using this application by sending us an e-mail at support.pdl-search@hp.com and providing us with the following information:
- The Web section ID of your web section
- Contact information for the person whom we will work with if a problem should arise; and
- The parameters that you used (complete information about these parameters will be covered later).
Implementation Details top
The functionality and visual elements of your site's contextual search
will be controlled by the various parameters that are passed to the
hp.com search application. Below you will find more information
on what aspects
of contextual search each of the parameters control.
The parameters MUST be passed to the hp.com search
application in a
HP Web Standards compliant search box form which utilizes a HTML GET request to http://www.hp.com/search/
Required Parameters: top
- The following are minimal parameters to make the contextual search
work properly: cc, lang, qp, hps, hpn, and qt
| Required Parameters for Contextual Search Functionality |
| cc (formerly "ctry") |
Country Code: This parameter contains the two letter country code that tells the search application which country/region the search should be conducted in. Below is the list of complete country code values that are supported by search.
|
emea_africa (Africa)
ar (Argentina)
au (Australia)
at (Austria)
be (Belgium & Luxembourg)
bg (Bulgaria)
bo (Bolivia)
br (Brazil)
ca (Canada)
lamerica_nsc_carib (Caribbean)
lamerica_nsc_cnt_amer (Central America)
cl (Chile)
cn (China)
co (Colombia)
cz (Czech Republic)
dk (Denmark)
de (Germany)
ec (Ecuador)
ee (Estonia)
es (Spain)
fi (Finland)
fr (France)
gr (Greece and Cyprus)
hk (Hong Kong)
hr (Croatia)
hu (Hungary)
id (Indonesia)
ie (Ireland)
il (Israel)
in (India)
|
jp (Japan)
kr (Korea)
kz (Kazakhstan)
lv (Latvia)
lt (Lithuania)
emea_middle_east (Middle East)
mx (Mexico)
my (Malaysia)
nl (Netherlands)
no (Norway)
nz (New Zealand)
pe (Peru)
ph (Philippines)
pl (Poland)
pr (Puerto Rico)
pt (Portugal)
ro (Romania)
rs (Serbia)
ru (Russia)
se (Sweden)
si (Slovenia)
ch (Switzerland)
sk (Slovak Republic)
sg (Singapore)
th (Thailand)
tr (Turkey)
tw (Taiwan)
ua (Ukraine)
uk (United Kingdom)
us (United States)
ve (Venezuela)
vn (Vietnam)
za (South Africa)
|
NOTES:
- Country code values outside of the following list will default to the "us".
Example: <input type="hidden" name="cc"
value="us">
|
| lang |
Language Code: This parameter contains the two letter language code that tells the search application which language the search should be conducted in. Below is the list of complete language code values that are supported by search.
zh-hans (Simplified Chinese)
zh-hant (Traditional Chinese)
bg (Bulgarian)
hr (Croatian)
cs (Czech)
da (Danish)
nl (Dutch)
et (Estonian)
en (English)
fi (Finnish)
fr (French)
de (German)
el (Greek)
he (Hebrew)
hu (Hungarian)
it (Italian)
ja (Japanese)
ko (Korean)
lv (Latvian)
lt (Lithuanian)
no (Norwegian)
pl (Polish)
pt (Portuguese)
ro (Romanian)
ru (Russian)
sr (Serbian)
sl (Slovenian)
sk (Slovakian)
es (Spanish)
sv (Swedish)
tr (Turkish)
NOTES:
- Language code values outside of the following list will default to the "en".
Example: <input type="hidden" name="lang"
value="en">
|
|
Note: You must use valid cc and lang value combinations specified below.
| cc - lang
|
emea_africa - en
emea_africa - fr
ar - es
au - en
at - de
be - nl
be - fr
bg - bg
bo - es
br - pt
ca - en
ca - fr
ch - fr
ch - de
cl - es
cn - zh-hans
co - es
cz - cs
de - de
dk - da
ec - es
ee - et
emea_middle_east - en
es - es
fi - fi
fr - fr
gr - el
hk - zh-hant
hk - en
hr - hr
hu - hu
id - en
ie - en
|
il - he
in - en
it - it
jp - ja
kr - ko
kz - ru
lamerica_nsc_carib - en
lamerica_nsc_cnt_amer - es
lv - lv
lt - lt
mx - es
my - en
nl - nl
no - no
nz - en
pe - es
ph - en
pl - pl
pr - es
pt - pt
ro - ro
rs - sr
ru - ru
se - sv
si - sl
sk - sk
sg - en
th - en
tr - tr
tw - zh-hant
ua - ru
uk - en
us - en
ve - es
vn - en
za - en
|
NOTES:
- Any cc and lang value combinations outside of the list below are default to the "us-en" (or US-English).
Example: <input type="hidden" name="cc"
value="us">
<input type="hidden" name="lang"
value="en">
|
| qp |
Query Prefix: This is the most important (and difficult) parameter to get right. This parameter is used to filter the results of the user's search so that only pages from your section will appear in the results. For more detailed information, please refer to Selecting QP value for my web section.
Examples:
- URL based: <input type="hidden"
name="qp" value="url:yourwebsection.hp.com/directory/">
- SITE based: <input type="hidden"
name="qp" value="site:www.yourwebsection.hp.com">
- WEB SECTION ID based: <input type="hidden"
name="qp" value="web_section_id:r1002">
- SEGMENT based: <input type="hidden"
name="qp" value="segment:hho">
To specify multiple qp parameter values, you must delimit each value with a space such as below:
Example which specify multiple qp value: <INPUT type="hidden"name="qp" value="web_section_id:r1002(space
here)site:www.yourwebsection.hp.com">
|
| hps |
Section
Name Text: This parameter contains the
text that corresponds to your web section radio
button label on the search results page.
Please choose a short but descriptive section
name.
Examples:
<input type="hidden" name="hps" value="HP NetServer Section Only">
|
| hpn |
Return
Page Text: This parameter contains the
text that corresponds to the text on the
left navigation menu on the search results page, which make it clear to the
user how to get back to your web section.
Examples:
<input type="hidden" name="hpn" value="Return to the HP NetServer Site">
|
| hpl |
Search
Scope
Selection: This parameter controls the
focus of the radio button which controls the
search scope. You usually do not need to configure
this parameter as it has already been configured
for you in the web template.
All you really
need to do is modify the radio button labels to
reflect your section name (replace "[section
name]") and the country of your web section
(replace "all of hp [country]).
For
your information, a setting of "1"
means to scope the search only to your web section, while a setting of "0"
means to expand scope and search the entire HP [country] web site. If you
do not specify this variable, the
default value will be "1".
Example:
<input type="radio" name="hpl" value="1" checked>search my site
<input type="radio" name="hpl" value="0">search all of HP
US
|
| qt |
Query Term: This parameter represents the actual query that the user will enter into the search
box. Please refer to the New HP Web Standards for proper text box specifications.
You only need to specify the HTML name of
the parameter as "qt" as there already
exists a hidden text box element in the web
template.
Example:
<input type="text" size="26" maxlength="100" name="qt" alt="Enter search criteria here">
|
Optional Parameters: hpa, hpr, and hpo
top
The last
three parameters are optional. If they are not specified,
they will be set to their defaults values by the search
application.
| Optional
Parameters for Contextual Search |
| hpa |
Assistance
Link: This parameter controls the URL link connected
to the "Contact HP" link on the left navigation bar. If you don't
supply this parameter, this button will link to the country
gateway contact hp or assistance page. We strongly
recommend that you supply an "hpa" that will link
users to your web section's assistance or Contact Us page
instead.
Example:
<input type="hidden" name="hpa" value="http://netserver.hp.com/assistance/">
|
|
hpr |
Return
Page Link: This parameter controls the URL link
connected to the text defined by "hpn" on the left navigation menu. If you don't supply
this parameter, clicking this link will take the user back
to the page on your web section that the user was on last, which
is usually the best practice. Though seldom useful,
this value can be passed into the contextual search engine
if you wish to return the user to a different page (like
your web section's home page) than
the one from which they entered the search interface.
Example:
<input type="hidden" name="hpr" value="http://netserver.hp.com/netserver/">
|
| hpo |
Search
Omniture Tag: This parameter
is used to provide search metrics/analytics capability for
your web section. This parameter defines the value of your
web section’s Omniture account ID. To utilize this
parameter, you MUST have a pre-existing Omniture account
setup for your web section. For more information,
please go to this page.
If
there are multiple Omniture accounts that the search data
must populate to, comma-separate the values .
Example:
<input type="hidden" name="hpo"
value="hphqglobalsite,hphqnasite,hpnetserver">
|
|
h_audience |
Product Quick Links (One-Click) and Featured Product Audience Tag: This parameter
is used to indicate that your web section would like
preference in returning one-click and featured product results relevant to your
web section's segment. The One-Click Product Access
is a feature that is only activated on search queries
which are product-based like "Laserjet 3700dn" and is
represented by the "Product quick links" panel on the
left-hand side of the search results.
Featured products is a search feature where product advertisements
are delivered on the left-hand side of the search results for specific
keywords. It is only available in countries using RealMedia to serve
banner ads or EasyAsk. This tag will determine the ability of HP.com
search to render single segment Featured Products in search results for
countries offering this experience. Segmented pages that do not have
h_audience parameter settings will show one featured product from HHO
and one from SMB.
For more information on segment, please go to this
page.
There
are four possible segment values which may be specified:
hho - Home & Home Office
smb - Small & Medium Business
large - Large Enterprise Business
b_to_b - Business-to-Business
All segmented web pages are strongly recommended to use this parameter. If your
web section doesn't fall under any of the above segments,
please ignore this parameter. Example:
<input type="hidden" name="h_audience"
value="hho"> |
Character set Handling
When defining
the search parameters using the form GET submission method,
the page containing the initial search box should have the browser character set encoding set
to the same character set that the search application uses.
To find out what character set the search application utilizes,
go to the desired search interface by providing the cc and lang parameters
(example: http://www.hp.com/search/?cc=us&lang=en),
and then 'view source'.
For example, the page containing a search box that calls
Taiwan-Chinese search should have the following HTML code within the <head>
section of the page:
<meta http-equiv="content-type" content="text/html; charset=big5">
Otherwise, if your page utilizes a different character set than the search page, you need to specify an additional search parameter called charset in the search request. The value of the charset parameter would be the character set value used in your web section page which calls search. As an example., if your web section page utilized the UTF-8 character set, you would need to specify 'UTF-8' as the character set value like below. The charset parameter provides HP.com search the necessary character set information to process the query correctly.
<input type="hidden" name="charset" value="UTF-8">
The 'submit' button used in the forms should be same one as on the Gateway home page (http://www.hp.com). Please reference the centralized image that are defined on the Gateway home page.
Putting
It All Together top
Once you've
decided what the values of the parameters will be, the next step
is constructing the URL or the HTML form submission code that you will use.
The order in which the parameters appear in the HTML code is
irrevelant.
For the HP Netservers (US-English example):
| Variable |
Value |
| cc |
us |
| lang |
en |
| qp |
web_section_id:r1002 |
| hps |
HP NetServer Section Only |
| hpn |
Return to the HP NetServer Site |
| hpa |
http://netserver.hp.com/netserver/assistance/ |
| hpr |
http://netserver.hp.com/netserver/ |
| hpl |
1 |
| hpo |
hphqglobalsite,hphqnasite,hpnetserver
|
|
h_audience |
hho |
| FINAL
form submission code |
<FORM action="http://www.hp.com/search/" method="GET">
<INPUT type="hidden"
name="cc" value="us" >
<INPUT type="hidden"
name="lang" value="en" >
<INPUT type="hidden" name="hps" value="HP NetServer Section Only"
>
<INPUT type="hidden" name="hpn" value="Return to the HP NetServer site">
<INPUT type="hidden" name="qp" value="web_section_id:r1002"
>
<INPUT type="hidden" name="hpr"
value="http://netserver.hp.com" >
<INPUT type="hidden"
name="hpa" value="http://netserver.hp.com/assistance/">
<INPUT type="hidden"
name="hpo" value="hphqglobalsite,hphqnasite,hpnetserver">
<INPUT type="hidden"
name="h_audience" value="hho">
<INPUT type="radio" value="1" name="hpl" CHECKED>HP NetServer Section Only
<INPUT type="radio" value="0" name="hpl">All of HP
US
<input type="text" size="26" maxlength="100" name="qt" alt="Enter search criteria here">
<INPUT type="image" src="http://welcome.hp-ww.com/img/hpweb_1-2_arrw_sbmt.gif" border="0" alt="Begin your search" name="submit" >
</FORM>
This HTML snippet represents the bare minimum code to get the search functionality working. You might need to add additional HTML tags to make it accessibility compliant.
|
SNF+ Users Instead of using the search builder below, it is recommended that you edit the search properties directly in the SNF+ application. In order to do this, please go to: Tools >> Default Country Settings.. >> Click on the "Customized" option box, then click on the Edit.. button >> Select the "search" tab.
- set "Form Action" to "http://www.hp.com/search/"
- set "Text Box Label" if necessary (in most cases default should be fine)
- leave "Enable contextual search radio buttons" checked
- enter the required values of cc, lang, qp, hps, and hpn. Optionally, check the hpa and hpr parameters to enable it. Then, enter their values.
- edit the "Local Section Label" value and optionally edit the "Countrywide Label" value if necesary
- Optionally, you may click on the "Optional Properties" buttons to edit (in most cases default should be fine)
- When you are done with all of the above steps, click on "OK".
- When a "Save As" dialog box pops open, enter a name you would like to save the xml file as (Example: netserver). Click "Save".
- IMPORTANT: To apply these settings across your entire site, click on "Apply to web". To apply these settings in the page you are currently editing, click on "Apply to page". Click "OK".
|
|
Search Builder
top
If you do not wish to create the form submission search
box code manually,
give the following form a try. By filling in the value
of the parameters and clicking "Put it together",
this form will build the form submission search box
code, and allow you to
preview your contextual search!
Do not enclose the values that you enter in the
textbox with quotes("").
|
More...
|