|
|
#1 (permalink) |
|
Surpass Fan
Comfy Contributor
Joined in Jul 2004
262 posts
Gave thanks: 0
Thanked 0 times
|
HTML sort of question
Ok, my site is getting bigger and there are more pages... before I just had a menu on each page and just had to add links to each page seprately, but that is becoming very tedious now. Is there (well I know there is) a way to create a single menu and just have it on every page, maybe an image or something. Make it in fireworks or something?
|
|
|
|
|
|
#2 (permalink) |
|
The Coolness
Excelling Contributor
Joined in May 2003
Lives in Sandpoint, Idaho
Hosted on Dime5
862 posts
Gave thanks: 0
Thanked 0 times
|
It will take some remodeling on your existing pages, but you can use Server Side Includes to "include" the menu part of each page. Then you only have to update menu.txt for example and all pages are updated. You can use an include statement in PHP as well.
If you look at my site you can see this in action. The footer, menu and head info are all "included" on each page.
__________________
Bronze Reseller Pass36 |
|
|
|
|
|
#3 (permalink) |
|
Surpass God
On a golden path...
Joined in Aug 2004
Lives in Leeds, UK
Hosted on Ultra
359 posts
Gave thanks: 0
Thanked 0 times
|
OKay,
Create a page called menu.html Make a menu inside that page. Then use a php include to include it into new pages you add. This way you will only have to edit menu.html and the menu on everypage will change. Hope that helped you out. Also, on the pages you use the php include on, save them as *****.PHP
__________________
Server: Ultra Website: ShucksVille.com / RelentlessImpact.com ---------------------------------------------------------------------- ShucksVille: Never following footsteps, creating our own! Relentless.Impact: Taking media to the next level! :surpass: |
|
|
|
|
|
#4 (permalink) |
|
Registered User
Seasoned Poster
Joined in Aug 2004
Hosted on SH59
84 posts
Gave thanks: 0
Thanked 2 times
|
I would try using some PHP includes. I used codegrrl.com's NL_Convert-to-PHP script and now I only have to change the header and footer on my pages for it to look different. It's a very fast and simple method.
|
|
|
|
|
|
#6 (permalink) |
|
Registered User
Seasoned Poster
Joined in Jun 2004
86 posts
Gave thanks: 0
Thanked 0 times
|
That code will just include a javascript not an extra page as such. However, the script could draw up the menu using "document.write ="
The HTML way of including would be with IFRAMES - <IFRAME src="menu.html" width="x" height="x"></IFRAME> Basically this just puts a frame in wherever the code is put. But i wouldn't recomend using this, PHP includes are the way to go... <?PHP include('menu.html'); ?>
__________________
http://www.revolution-discos.co.uk |
|
|
|
|
|
#7 (permalink) |
|
Surpass Fan
Seasoned Poster
Joined in Jun 2004
49 posts
Gave thanks: 0
Thanked 0 times
|
Well 5 years ago I would go with SSI but nowadays with PHP and how great it has become, I use PHP includes on all my pages. Combined with a bit of PHP scripting it makes managing website content a whole lot easier.
__________________
cc-direct.net PASS71 - 72.29.77.17 |
|
|
|
|
|
#8 (permalink) |
|
Surpass Fan
On a golden path...
Joined in Jul 2004
372 posts
Gave thanks: 0
Thanked 0 times
|
about how many php includes do you think is a good number? I could have like 15 includes but wont that slow the speed of the loading of the webpage? I was just wondering that is.
__________________
"I am one of the few honest people that I have ever known” ~~Nick, Great Gatsby --- Don't ever argue with idiots. They drag you down to their level and beat you with experience. |
|
|
|