-
menu in all pages
alright i have a problem i am trying to add a mean you to all my pages and the menu is in head.html and i want to add it all the pages with haveing to go to every page to edit the menu
-
-
Mind telling us if your host supports PHP?
-
-
they host everything but ruby
-
-
You can search through the old discussions here for many options.
If you can use PHP, though, it should be easy.
<?php include('directory/menu.htm'); ?>
That's all.
Place that code where you want your menu to appear in every page and it will be inserted there.
Make sure that the main pages end with .php. (.htm will skip the php code.)
Also, this is embedding the code of menu.htm directly into your page, so plan ahead: don't include <html>...</html> tags, don't have an extra <head> section, remove extra tags, etc. After you set this up, go to one of the pages and choose view>source, and see what the generated code looks like.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
what if i dont want to rename all the pages
-
-
Then:
1) Find another way aside from php (but php is the most customizable, useful way).
or
2) Set your server to parse all .htm/.html pages as php. This is possible, but inefficient, because every page will be parsed that doesn't have to be. Some people do this, though. Up to you.
It looks like the code you need in your .htaccess file is this:
AddType application/x-httpd-php .html
See more info here:
http://www.webmasterworld.com/forum92/2298.htm
But again, be careful when setting your server to parse every .htm page as .php if you don't need to.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
-
-
The fact that Dragoth has his menu in head.html suggests that he is using a frameset. If so, the solution for having a menu on every page must be different.
Dragoth, are you using a frameset?
===
Arie Molendijk.
-
-
Yes, PHP is an entirely different approach from frames, and much better (because it ends up being a single page for the viewer).
If head.html is for a frame, then it will need to be recoded as above.
And by the way, that link in my post is not necessarily the best information, just the first one that popped up on a google search. It should be easy to find more if you need it.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
no im not using frame set
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks