Sitemap - display

J

JimDoran

Is there a way of displaying a sitemap (ToC) in an expand/contract format? I
have created a sitemap based on the navigation view. As there are multiple
levels and, within these, some pages have numerous downloadable documents,
the display in the browser of the final sitemap is very lengthy. It also
displays automatically in full with no option to contract.
 
S

Stefan B Rusynko

Not when using the std FP ToC webbot because it is generated by FP when you save the page
- create a manual list of links and apply css to expand / contract
(an easy way to get the manual list is to save the FP generated list in the html from the Browser - File Save as)

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Is there a way of displaying a sitemap (ToC) in an expand/contract format? I
| have created a sitemap based on the navigation view. As there are multiple
| levels and, within these, some pages have numerous downloadable documents,
| the display in the browser of the final sitemap is very lengthy. It also
| displays automatically in full with no option to contract.
 
T

Trevor Lawrence

Jim,
I have been revising a sitemap on my site

I will use Stefan's suggestion to check that I have all the links.

But I also have written JS code to expand and contract. It does require that
you code the entries by hand but the JS function does the work

Here is my page (subject to revision)
http://tandcl.homemail.com.au/sitemap.html

Woops, I just checked the page and Expand/Contract is not working .

IWGBTY (I will get back to you) if I solve it and you have no other replies
 
T

Trevor Lawrence

Jim,
I fixed the problem on my page. Some of the JS was missing

You can look at the page if you like
http://tandcl.homemail.com.au/sitemap.html

The expand/contract buttons are written by this code
<a href='#' onclick="ExpandAll();return false">Expand All</a>&nbsp;|&nbsp;
<a href='#' onclick="ExpandAll('hide');return false">Collapse All</a><br />
Click <img src="images/display/plus.gif" alt="" width="15" height="15" />
to expand
<img src="images/display/minus.gif" alt="" width="15" height="15"
/> to collapse<br />

As you can see, the plus and minus images are "images/display/plus.gif" and
"images/display/minus.gif"

The expand/contract behaviour is managed by code like this
<ul style="margin-left:0">
<dt><a href="#" onclick="changeVisibility(1);return false">
<img src="images/display/plus.gif" alt="" id="image1" width="15"
height="15" /></a>
<a href="index.html" class="head4">Trevor and Carole's Home
Page</a></dt>
<ul id="ulist1">
<dt><img src="images/display/smfile.gif"><a
href="news.html">News</a></dt>
<dt><img src="images/display/smfile.gif"><a href="dayborn.html">Day
Born</a></dt>
</ul>
.........
</ul>

The <dt></dt> is the heading which displays when contracted. The plus image
has an ID e.g. "image1".
Associated with the <dt> is a <ul></ul> which has an ID of "ulist1" - the
number here (1) must match that in "Image 1" above it

Repeat the pattern for further entries

All you need then is this JS code which I have in external .js
//---------------
function ExpandAll(hide){
var i = 0
while (document.images["image" + ++i])
showVisible(i,hide)
}
//------------------------------
function changeVisibility(i){
var hide = (document.images["image" + i].src.match(/^.+minus\.gif$/)) ?
'hide' : ''
showVisible(i,hide)
}
//------------------------------
function showVisible(i,hide){
var sign = (hide) ? "plus" : "minus"
document.images["image" + i].src = "images/display/" + sign + ".gif"
document.getElementById("ulist" + i).style.display = (hide!='hide') ?
"block" : "none"
}
//---------------

You can also force the list to contract on loading by using
<body onload="ExpandAll('hide')">

Good luck
(I may be abe to help if this sounds too complex.)
 
J

JimDoran

Many thanks. I had suspected that that may be the case. I'll take up your
suggestion.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top