Tree menu

R

Rob

I have a website that does not have a database associated with it. The
original version of the web site had a menu on the left side of the screen
that was very simple. As the years have passed, the menu has grown and is
getting more complicated -- many sections, subsections, subsubsection,
etc... For example, menu is looks like:

Section 1
Subsection 1.1
Subsection 1.2
Subsection 1.3
Section 2
Subsection 2.1
Subsubsection 2.1.1

etc...

Unfortunately, this menu is hardcoded into each page and is getting a little
out of hand. I would like to put this into an include on each page and
generate the menu from a script. Since I don't have a database, it appears
that arrays or dictionary objects are the way to go. Does anyone have a
similar script out there? Any info on how to do this?

Thanks.

Rob
 
B

Bob Barrows

Rob said:
I have a website that does not have a database associated with it.
The original version of the web site had a menu on the left side of
the screen that was very simple. As the years have passed, the menu
has grown and is getting more complicated -- many sections,
subsections, subsubsection, etc... For example, menu is looks like:

Section 1
Subsection 1.1
Subsection 1.2
Subsection 1.3
Section 2
Subsection 2.1
Subsubsection 2.1.1

etc...

Unfortunately, this menu is hardcoded into each page and is getting a
little out of hand. I would like to put this into an include on each
page and generate the menu from a script. Since I don't have a
database, it appears that arrays or dictionary objects are the way to
go. Does anyone have a similar script out there? Any info on how to
do this?

Thanks.

Rob
This seems like the ideal application for xslt and xml - there are many
books and websites that cover this topic.

Bob Barrows
 
R

Rob

My question is not really where to store the data -- i.e. xml, dictionary
object, array... -- but more of the logic of how to store it and how to
write it out to html. I have seen some javascript tree menu's out there but
I wanted to use asp so I would not have to worry about maintaining the
script for different browsers. I just figured that someone has already done
this or has some info on how to do this. Thanks.

Rob
 
R

Rob

Bob,
This looks great. Just what I was looking for. I would like to combine it
with your earlier recommendation of xml and xslt. Can you point me in the
direction of a good reference on this suited to this task? i.e. how to
traverse/query the xml file.

Thanks.

Rob
 
B

Bob Barrows [MVP]

I would have to use Google to find some - look at
msdn.microsoft.com/library, you'll definitely finds some stuff there.

Bob Barrows
 

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

Members online

Forum statistics

Threads
474,147
Messages
2,570,833
Members
47,378
Latest member
BlakeLig

Latest Threads

Top