Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:29
Menu on Each Page? IIS Footer or Not?
Poster: WilD
Dated: Monday June 2 2003 - 17:24:14 BST
We've developed the content of the menus (very nice!) for our site redesign. Everything works fine by putting the specified two lines of code in a page. So far so good.
We've also experimented with putting these lines in an server side include, renaming a given file to parse for SSI and adding the include reference to a page. This also works.
My goal, though, is have the menus show up on each of our 6000 pages, preferably automatically. One approach I'm trying is using the the capability in the MS Internet Information Service which allow for the automatic inclusion of a footer on every page.
When I reference my include file in as the IIS footer it fails. The problem appears to be that when menu_array.js and mmenu.js are called, the include file code is appended to them as well.
So, two questions:
1. Is it possible to use the menu system within the IIS footer?
2. Is this a smart way to include the menus on all pages of a site? Can anyone suggest other approaches that will lead me toward this end.
THanks
Poster: Andy
Dated: Tuesday June 3 2003 - 22:50:43 BST
The way that I've always done it is to use include files.
These are basically a set of functions inside a single file that are included inside each .asp or .php file. If you ever need to change the single file it becomes global across all files.
The only drawback is that all of your existing .asp files ill need to have the addition of the include file. I understand that 6000 files will take some time to modify manually so it might not be the best solution at present, although there are tools that will do this work for you. Ultraedit (the editor that we use for everything) has a global text replace that will replace on text in all files in a sub directory, it is also recursive.
However, after some thought I really don't see why the menu cannot be added by the server. Have you tried adding them as a header instead of a footer
Cheers
Andy
Poster: WilD
Dated: Wednesday June 4 2003 - 0:00:54 BST
Andy, thanks for the reply. It looks like this footer capability is essentially the same as an include file. The difference is that it "includes" with every file this is loaded, and from what I can tell, when the Milonic files are pulled in, IIS wants to append the include file contents to them as well. It becomes sort of a recursive nightmare.
It seems like a header would have the same problem, plus I don't see a feature in IIS for header--only footer.
I've considered using standard include files and going through the pain of changing all files. It's a little worse than you say, though, because most of my files have an .html extension, so I'll need to rename them to .asp in order to allow the include function to be recognized.
I've been wondering about a good tool for mass search and replace, so I'll check into Ultraedit. Does it work with subdirectories below the the main directory, or will each subdirectory require a new search?
Wil
Poster: Andy
Dated: Wednesday June 4 2003 - 9:06:17 BST
Ultraedit from http://www.ultraedit.com should allow you to traverse sub directories.
I'm sure you're already aware of this but if not; Ensure that you only "Replace In Files" on files that are backups of the original. I'm just making sure, would hate you mess up 6000 files
Also, good ole MS DOS will be able to batch rename your files.
Code:
rename *.* *.asp
will rename everything to .asp
Cheers
Andy
same issue here
Poster: zjoker
Dated: Saturday January 17 2004 - 6:21:43 GMT
hello andy,
I too have the same problem..not exactly, but similar.
All my files already have the extention .shtml
I have tried virtual evrything to get the ssi to showup..nothing is working.
In my editor program, the 3 .js files show up once I have the ssi code in place..but upon review (and upload), the menu just doesnt show up.
I am not receiving the error you usually get when a ssi file is missing, so I am at a complete loss as to what to do at this point.
I tried .asp extention as well.
Other ssi files on the page are showing up.
Any help?
Thanks for the thread.
zjoker
Re: Menu on Each Page? IIS Footer or Not?
Poster: John
Dated: Saturday January 17 2004 - 23:46:00 GMT
WilD wrote:
Everything works fine by putting the specified two lines of code in a page.
Need to ask, exactly what "two lines of code" do you mean? There are more than 2 lines to properly call all the menu code.