<div id="returnlinks"> ... </div>
where the
returnlinks
ID is required and should not be changed. Place DIV at the very beginning of the
topics' header.
2. Simplified, a return link may look like one of
these:
<span onclick="frm('toc');">Hierarchy</span>
<span onclick="frm('index');">Index</span>
You may add formatting (mouseover, pointer, etc.) or use an A element instead.
3. Here is the frm() function:
Use it exactly as shown. The pane argument can take 2
values, toc or index,
causing the HI frame to show the hierarchy, or the index. You'll probably include this
function with the rest of your JavaScript in a .js file
you reference on your pages' template.
Note. You may include return links for both the hierarchy and
the index. When strict 'close' control is enforced ("'close' strict mode" in KSW Options >
Project Options > Web Config is checked), only pages with a
returnlinks element ID respond to the 'close' link.
Note. When your KB configuration is TOC Only, or
Index Only (see KSW Options > Project Options > Web Config), it is obvious you may not
implement both return links.
4. More on configuring the return links; here is a simple method of hiding the return links when a topic is shown within the KB, and showing them otherwise (when a topic is displayed by itself, taking the full browser window):
Note. We keep
suggesting code solutions for those who might need them, although we are aware many will
implement their own way.
<body onload="load()">
Add the onload attribute to the topic template. Add the
load() function bellow to the .js
file.
function load()
{
var el = document.getElementById('returnlinks');
if (location == top.location)
el.style.display = "block";
else
el.style.display = "none";
}
You may put a returnlinks DIV in the header, at the very top. Then when a topic is shown outside the KB, the page is shifted down a notch to make space for the newly displayed DIV, containing one or more return links.