Navigation...

  • Jako
  • Banned
  • Banned
  • No Avatar
  • Joined: Oct 30, 2003
  • Posts: 227
  • Status: Offline

Post June 23rd, 2004, 11:48 am

I know this is possible cause my friend used it on his site. But when he explained it I got confused.

I want to keep the navigation on each page the same. He said he used php_include codes, but I am not sure how to do this. I want it so when I update the navigation, it gets updated for each page w/o having me to go manually into each page and adding each link.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 23rd, 2004, 11:48 am

  • CazpianXI
  • Proficient
  • Proficient
  • User avatar
  • Joined: Dec 22, 2003
  • Posts: 285
  • Status: Offline

Post June 23rd, 2004, 11:52 am

Jako, here's what you do.

Open up your page's HTML source and CUT (not copy) the navigation for your site. Paste it into a file. Then, just replace the code you just cut out with:

PHP Code: [ Select ]
 
<?
 
include "filename";
 
?>
 
 
  1.  
  2. <?
  3.  
  4. include "filename";
  5.  
  6. ?>
  7.  
  8.  


Where filename is the path to the new file you just created.

Hope this helps!

~Cazpian the 11th
  • Jako
  • Banned
  • Banned
  • No Avatar
  • Joined: Oct 30, 2003
  • Posts: 227
  • Status: Offline

Post June 23rd, 2004, 11:53 am

thanks a ton...let me try this out and I'll get back to you.
  • CazpianXI
  • Proficient
  • Proficient
  • User avatar
  • Joined: Dec 22, 2003
  • Posts: 285
  • Status: Offline

Post June 23rd, 2004, 12:23 pm

Glad to be of service!

~Cazpian the 11th
  • MasterSlowPoke
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jun 19, 2004
  • Posts: 7
  • Loc: Tampa
  • Status: Offline

Post June 23rd, 2004, 12:29 pm

Make sure that the filename has the extentsion .php, not .html, and that your server supports php. You won't be able to test this on your machine unless you set up an apache server or something.
  • CazpianXI
  • Proficient
  • Proficient
  • User avatar
  • Joined: Dec 22, 2003
  • Posts: 285
  • Status: Offline

Post June 23rd, 2004, 12:49 pm

Ah, yes MasterSlowPoke.

Thanks for mentioning that. I forgot that not everyone here knows PHP :blush:

BTW: You can name the file .php or .inc -- either one will work. Usually, it is a good practice to name your files .inc for external files that are being included.

By included, I mean:

PHP Code: [ Select ]
 
<?
 
include "thisexternalisbeingincluded.inc";
 
?>
 
 
  1.  
  2. <?
  3.  
  4. include "thisexternalisbeingincluded.inc";
  5.  
  6. ?>
  7.  
  8.  


~Cazpian the 11th

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 130 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.