 |
|
 |
If your Professional or Premium Plan's search results template needs to
bring in other files, please consider the following options:
- CSS, Javascript, images, other files : any file can be
referenced that's hosted on another website by using a fully qualified
URL, that is one starting with http://. So if you have relative links
in your template, you'll need to add the full URLs back to the sources.
- Server Side includes and scripts : if you have a web page
building system on your servers that constructs the HTML of your site
pages from pieces on your server, that isn't the form that PicoSearch
needs for your template. You need to give PicoSearch the end product of
HTML that a visitor to your site sees in their browser. Try just
viewing the source from the outside in a browser, and modifying that
HTML to make your PicoSearch template. PicoSearch cannot run your
server side includes or host additional files, but it shouldn't have to
either.
- IE behavior files like csshover.htc : Internet Explorer
supports a feature called behaviors using special .htc files that are
supposed to be on the same server when included externally through CSS.
Behaviors are an exciting way to add extra functionality to HTML
elements through javascript that is encapsulated in the .htc file. For
example, you can make an image fly around just by applying a class that
has a behavior behind it. In practice, behaviors have been used to
compensate for IE's shortcomings, such as its lack of a :hover selector
for HTML elements, which other browsers support so you can make
mouseover effects just using CSS. The popular csshover.htc file that
fixes IE for :hover is described at this external site.
What is not often mentioned is that .htc files can be included in your
HTML, thus avoiding the same-server restriction that would otherwise be a
problem for the one PicoSearch template file. See below for an example
that relates to csshover (much is left out just so you see where things
go).
AS SEPARATE FILES: not compatible with PicoSearch
index.html: conditionally includes the IE-only css file that calls the .htc behavior
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<link rel="stylesheet" style="css/text" href="css_menu.css">
<!--[if IE]>
<link rel="stylesheet" style="css/text" href="css_menu_ie.css" media="screen" >
<![endif]-->
</head>
css_menu_ie.css: the IE-only css file that calls the .htc behavior
body {
behavior: url(csshover.htc);
}
#menu ul {
width: 1px;
}
...etc...
csshover.htc: javascript for the behavior (parses style sheets for :hover)
<attach event="ondocumentready" handler="parseStylesheets" />
<script language="JScript">
/** hover javascript follows
*/
function parseStylesheets() {
...etc...
}
</script>
AS ONE FILE: compatible with PicoSearch for the one template
index.html: contains everything needed for the behavior
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<link rel="stylesheet" style="css/text" href="css_menu.css">
<!-- <link rel="stylesheet" style="css/text" href="css_menu_ie.css" media="screen" > -->
<!--[if IE]>
<script language="JScript">
addLoadEvent =
function (func)
{
var oldonload = window.onload;
if (typeof window.onload != 'function')
{
window.onload = func;
}
else
{
window.onload =
function()
{
if (oldonload)
{
oldonload();
}
func();
}
}
}
/** hover javascript follows
*/
function parseStylesheets() {
...etc...
}
</script>
<style type="text/css">
body {
behavior: expression(addLoadEvent(parseStylesheets));
}
#menu ul {
width: 1px;
}
...etc...
</style>
<![endif]-->
</head>
|
|
 |
|
 |