Subdirectories

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
Randy
Beginner
Beginner
Posts: 2
Joined: Wed Sep 25, 2002 6:10 pm

Subdirectories

Post by Randy »

I am reviewing this menu and it is truly awesome.

However I have a question...

I have subdirectories such as:
Recipes
News
Files
Includes
Images
JS
Calendar

All the menu files and would be located in the Includes directory in a file called: HEADER (to include the two JS files)

Now the menu I am trying to get to work would be visiable across all directories.

So if you were viewing the INDEX file in the NEWS directory, there would be a call to the INCLUDES directory to obtain the HEADER file which basically does the layout of the page along with the menu. At the end of the INDEX file is a call to the FOOTER page which is also in the INCLUDES directory.

The menu does not work unless it is called from the same directory.

:?: Is this how it works? Can this be used with Subdirectories?

Thanks in Advance! 8) :idea: :?:
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

I use includes all over the place on a lot of my pages. See http://westcgi.west.asu.edu/sai/ as an example. These are ColdFusion pages, but that shouldn't matter.

I call the menu scripts with

Code: Select all

<cfinclude template="/sai/templates/Nav_Standard.cfm">
which is nothing more than

Code: Select all

<script language="JavaScript" src="/sai/templates/menu_array.cfm" type="text/javascript"></script>
<script language="JavaScript" src="/sai/templates/mmenu.js" type="text/javascript"></script>
Headers, footers, and css are also called in the same way. Since I have a number of sub- and sub-sub-directories and they all call to the same location (/sai/templates/), you can see that it does work.
John
Randy
Beginner
Beginner
Posts: 2
Joined: Wed Sep 25, 2002 6:10 pm

Post by Randy »

Well I am using CF and have a directory setup as such:

Client / Secure
Client / Secure / Members
Client / Secure / Includes

Within the INCLUDES directory I have the files:
Header.cfm
Footer.cfm
mmenu_array.js
mmenu.js

In the Client / Secure / Members directory I have a file called INDEX.CFM


Example of the INDEX.CFM
<cfinclude template="../includes/header.cfm">
::Blah::
::Blah::
<SCRIPT language=JavaScript src="../includes/mmenu_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="../includes/mmenu.js" type=text/javascript></SCRIPT>

::Blah::
::Blah::
<cfinclude template="../includes/footer.cfm">

And I get the Header, MAIN Page, Footer, but no MENU.

Ideas?
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Ideas? Yep.

Don't use the relative addressing (../xxx/yyy/, etc). Note in my examples I pick up from where the implied base leaves off. For instance, /sai/templates/mmenu.js, etc. I think that will make the difference.
John
Post Reply