CSS Menu on multiple pages - Post ID...

User 169276 Photo


Registered User
4 posts

I purchased a theme that has a vertical menu on the left side.
Using the CSS Menu Designer in the html editor, I created a menu for the website.

However, my site is now at 20 pages and will be growing. I do not want to cut and paste the code on every page when a change is made to the menu.

How can I use this one menu on all the pages on my site?

I also tried the same menu generated as a javascript because I've done that before and it doesn't work either.

Thanx
User 187934 Photo


Senior Advisor
20,266 posts
Online Now

You could use:
PHP includes
Iframes
javascript includes

But guess what, You'll need to paste the code to every page.:lol:
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 38401 Photo


Senior Advisor
10,951 posts

I checked this out just a little while ago when I was looking for the same thing for a client's site that is almost 300 pages. It's quite easy to use and nothing "hacking" about it other than it's name lol. It's a work around basically and works pretty slick if you remember to do the page settings lol which I forget to do half the time and then wonder why I can't see the menu! haha. Anyways something to check out if you are interested in an easier than PHP way to do this.

http://www.parkansky.com/tutorials/bdlo … m#xbithack
User 169276 Photo


Registered User
4 posts

I had a javascript generated by another prorgam that didn't work
User 38401 Photo


Senior Advisor
10,951 posts

The one I gave the link to above definitely works, I've tried it on 2 different sites and am using it on that client site I mentioned with almost 300 pages :)
User 184085 Photo


Ambassador
1,707 posts

Probably the simplest solution is to use the HTML search and replace feature. Select your menu code, and put in the 'find box', then again in the 'replace with box' and make the changes you want to make.

Select look in folder and *.html for the files to be looked into and voila, all your html documents in that folder are searched for your menu code and updated with the new code.

http://i130.photobucket.com/albums/p248/pug2775/coffeecup/coffee_searchreplace.jpg

Volunteering to help :)
http://www.tbaygeek.ca
My HTML play area
http://www.tbaygeek.ca/test/
User 38401 Photo


Senior Advisor
10,951 posts

Actually my suggestion is much easier David. The reason it's easier is you set it up once, set up your pages once (need to alter permissions) and you're done. Then you just have to edit one file to change your menu on all of them same as you would if it were a Server Side Include or a PHP Include, just without the hassle of having to change the page extensions to .php as this allows you to leave them as .html :)
User 187934 Photo


Senior Advisor
20,266 posts
Online Now

I think Davids is easier if you take in consideration familiarity of the application.:P
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 169276 Photo


Registered User
4 posts

JoAnn...
I don't understand how xbithack works or what to do with it.
User 38401 Photo


Senior Advisor
10,951 posts

Here's a little more info, basically you're using an SSI (Server Side Include) without having to use .shmtl file extensions.
http://gnwda.org/tutorials/Q&A/includes.htm

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.