[thelist] DHTML menu linking problem

Phil Essing phil at sector404.org
Sat Oct 26 09:35:00 CDT 2002


Unruly,

I'm not sure of all your constraints, but here's what I would do:

1 - change all the links in your menu to "root links" - all links begin
with a forward slash.  Now all your links will be referenced from the
site's root folder.  Like this:

<a href="/products/widget.html" title="We make reakky great
widgets!">Widgets</a>

2 - Place your menu in one centralized file and include that file in all
your pages.  Using root links allows you to use the same code at any
level of the site, without breaking the links.

There are many ways to include a file, using SSI, PHP, or ASP.  The most
common is SSI (server-side includes).  Here's what an SSI include
statement looks like:

<!--#include virtual="/includes/main_menu.inc" -->

Hope that helps.

-phil



------------------------------------------------------------------------
-----------------
Phil Essing
phil at sector404.org

Visit me on the Web at: http://www.sector404.org
------------------------------------------------------------------------
-----------------



> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org] On Behalf Of unruly mongrel
> Sent: Saturday, October 26, 2002 2:34 AM
> To: thelist at lists.evolt.org
> Subject: [thelist] DHTML menu linking problem
>
>
> Hello, geniuses.  I spent a lot of time adapting the HV
> dropdown menu from dynamicdrive and created a flawless,
> beautiful piece of work that worked even in AOL.  Put it on
> all the pages of my 300+ page site and then realized a
> crucial under/oversight:  the links in the javascript coding
> are restricted to a particular folder.  I.e., the links don't
> adapt depending on what page in what folder the menu is
> installed in.  And, to the best of my knowledge, Dreamweaver
> (MX, what I'm using), whenever I do a sitewide "change link",
> it always seems to skip any links contained in <script> tags.
>   The only workaround for this I can think of is to create
> 3-4 different versions of this menu, each one designed for a
> specific file hierarchy level
> (i.e: ../, ../../, etc), but the file sizes on these scripts
> are pretty big, and I'd rather not have my users download any
> more coding than is necessary.
>
> Is that pretty much what I'm going to have to do, or has
> anyone encountered this problem and come up with a more
> efficient workaround?  I hope to gawd I'm making sense.  =)
> If this is too newbie, here's my tip:
>
> <tip>
> The classic bruise for Halloween can easily be created with a
> base of gold yellow, and then layering on in concentric
> circles layers of red, blue and purple.  Great for dotting
> the neck with, for a truly ghoulish effect. </tip>
>
>
>
>
> _________________________________________________________________
> Get faster connections -- switch to MSN Internet Access!
> http://resourcecenter.msn.com/access/plans/default.asp
>
> --
>
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !
>




More information about the thelist mailing list