Adding a new page...quick way to add to navigation bar?

This is a discussion on "Adding a new page...quick way to add to navigation bar?" within the Starting Out section. This forum, and the thread "Adding a new page...quick way to add to navigation bar? are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Starting Out

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 22nd, 2007, 18:42
Junior Member
Join Date: Aug 2007
Location: Cornwall, UK
Age: 37
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Adding a new page...quick way to add to navigation bar?

I want to add a couple of new pages to my website and wondered if there was a way or tool to use to copy the new navigation menu to all pages instead of copying and pasting to each of the seperate pages...think there are around 13 so far. Just seems a little time consuming.

Ive copied my old website and basically pasted the info into dreamweaver before editing it for the new site....cheating I know but my web course starts this week!
TIA.
Reply With Quote

  #2 (permalink)  
Old Sep 22nd, 2007, 19:29
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,639
Thanks: 0
Thanked 7 Times in 7 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: Adding a new page...quick way to add to navigation bar?

Try using PHP includes... http://www.webforumz.com/vbarticles....e&articleid=27
Reply With Quote
  #3 (permalink)  
Old Sep 23rd, 2007, 14:28
Junior Member
Join Date: Aug 2007
Location: Cornwall, UK
Age: 37
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Adding a new page...quick way to add to navigation bar?

Thanks for that will have a read.

I have noticed that on each seperate page, depending on what page it is...there is a class active command. Ie, on the index page, the class active code is next to the index page, on the electrics page it is next to the electrics line in the navigation panel. Is this required as if Im reading it right, the includes code will just read the whole navigation panel as it is say on the index page to each of the subsequent pages without the seperate class active piece of code.....now Ive confused myself! lol.
Reply With Quote
  #4 (permalink)  
Old Sep 23rd, 2007, 14:36
alexgeek's Avatar
Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,771
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: Adding a new page...quick way to add to navigation bar?

class active command?
could you explain please
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #5 (permalink)  
Old Sep 23rd, 2007, 14:47
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,639
Thanks: 0
Thanked 7 Times in 7 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: Adding a new page...quick way to add to navigation bar?

Ok... I dont understand what 'class active command' either although this is what you need to do:

1. Create a page called nav.inc (or nav.php/html/htm/whatever you want!)

2. Place your navigation in that file with NOTHING else.

3. The page(s) you want to show this navigation, make sure they have .php ending (e.g. index.php).

4. Where you want to show the navigation (in the .php ending page) put: <?php include('nav.inc'); ?>

Hope that helps...
Reply With Quote
  #6 (permalink)  
Old Sep 23rd, 2007, 16:40
Junior Member
Join Date: Aug 2007
Location: Cornwall, UK
Age: 37
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Adding a new page...quick way to add to navigation bar?

This is a section of the code from the index page.


<div id="siteNavigation">
<h1>Navigation</h1>
<ul>
<li><a href="index.html" class="active">Home</a></li>
<li><a href="pictures.html" >Pictures</a></li>
<li><a href="shipping.html" >Shipping</a></li>
<li><a href="intheuk.html" >Once in the UK</a></li>
<li><a href="electrics.html" >Electrics</a></li>
<li><a href="headlights.html" >Headlights and Sidelights </a></li>
<li><a href="rearlights.html" >Rear lights</a></li>
<li><a href="holes.html" >Holes in the floor pans</a></li>
<li><a href="brakes.html" >Brakes</a></li>
<li><a href="wheelsandtyres.html" >Wheels and Tyres</a></li>
<li><a href="engine.html" >Engine</a></li>
<li><a href="transmission.html" >Transmission</a></li>
<li><a href="runningrepairs.html" >Running repairs</a></li>
<li><a href="howmuch.html" >How much</a></li>
</ul> <li><a href="contact.html" >Contact us</a></li>
<div id="listBreaker"> </div>
</div>


You can see the 'class="active"' code next to the index.html entry. On the pictures page, this is then shown next to the pictures.html entry and so on. Is this not required? Also, should the final </ul> come at the end of the navigation code rather than in front of the contact line?

OK thanks for that Marc. Will try that on the next site I have a go at. Seems much better to just edit one page and be done with it. I guess if I had done this in the first place it would have saved a lot of copying and pasting!

For now I think it may be best (easiest? ) just to add a couple of extra lines to my navigation menu on each page as I would have to create a new navigation page and then remove the existing navigation code from each of the existing pages.
Reply With Quote
  #7 (permalink)  
Old Sep 23rd, 2007, 16:56
alexgeek's Avatar
Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,771
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: Adding a new page...quick way to add to navigation bar?

Quote:
Originally Posted by jotto View Post
This is a section of the code from the index page.


<div id="siteNavigation">
<h1>Navigation</h1>
<ul>
<li><a href="index.html" class="active">Home</a></li>
<li><a href="pictures.html" >Pictures</a></li>
<li><a href="shipping.html" >Shipping</a></li>
<li><a href="intheuk.html" >Once in the UK</a></li>
<li><a href="electrics.html" >Electrics</a></li>
<li><a href="headlights.html" >Headlights and Sidelights </a></li>
<li><a href="rearlights.html" >Rear lights</a></li>
<li><a href="holes.html" >Holes in the floor pans</a></li>
<li><a href="brakes.html" >Brakes</a></li>
<li><a href="wheelsandtyres.html" >Wheels and Tyres</a></li>
<li><a href="engine.html" >Engine</a></li>
<li><a href="transmission.html" >Transmission</a></li>
<li><a href="runningrepairs.html" >Running repairs</a></li>
<li><a href="howmuch.html" >How much</a></li>
</ul> <li><a href="contact.html" >Contact us</a></li>
<div id="listBreaker"> </div>
</div>


You can see the 'class="active"' code next to the index.html entry. On the pictures page, this is then shown next to the pictures.html entry and so on. Is this not required? Also, should the final </ul> come at the end of the navigation code rather than in front of the contact line?

OK thanks for that Marc. Will try that on the next site I have a go at. Seems much better to just edit one page and be done with it. I guess if I had done this in the first place it would have saved a lot of copying and pasting!

For now I think it may be best (easiest? ) just to add a couple of extra lines to my navigation menu on each page as I would have to create a new navigation page and then remove the existing navigation code from each of the existing pages.
I think i might know what you're on about.
have a look on this page
if you click on different links they are highlighted in the nav
is this what you want?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #8 (permalink)  
Old Sep 23rd, 2007, 16:59
Junior Member
Join Date: Aug 2007
Location: Cornwall, UK
Age: 37
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Adding a new page...quick way to add to navigation bar?

Alex, the website is www.pamsghia.co.uk It all seems to be working the way I want for now. Just wondered what the class active thing was and also the </ul> that I mentioned.
Reply With Quote
  #9 (permalink)  
Old Sep 23rd, 2007, 17:01
alexgeek's Avatar
Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,771
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: Adding a new page...quick way to add to navigation bar?

this :

<li><a href="howmuch.html" >How much</a></li>
</ul> <li><a href="contact.html" >Contact us</a></li>
<div id="listBreaker"> </div>

should be:

<li><a href="howmuch.html" >How much</a></li>
<li><a href="contact.html" >Contact us</a></li></ul>
<div id="listBreaker"> </div>
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #10 (permalink)  
Old Sep 23rd, 2007, 17:03
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Adding a new page...quick way to add to navigation bar?

the class="active" is probably just to show a different state when you are on that page.

I usually call it "selected" but ... every designer has their way of doing things
Reply With Quote
  #11 (permalink)  
Old Sep 23rd, 2007, 17:04
Junior Member
Join Date: Aug 2007
Location: Cornwall, UK
Age: 37
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Adding a new page...quick way to add to navigation bar?

lol, thats what I thought....weird how it seems to be working!
Like I said, I have just copied and pasted a lot of code that i really know nothing about and edited it using dreamweaver in the split mode so I can actually see what changes Im making rather than actually learning the code!!!

Good job my course starts this week.
Reply With Quote
  #12 (permalink)  
Old Sep 23rd, 2007, 17:05
Junior Member
Join Date: Aug 2007
Location: Cornwall, UK
Age: 37
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Adding a new page...quick way to add to navigation bar?

Quote:
Originally Posted by karinne View Post
the class="active" is probably just to show a different state when you are on that page.

I usually call it "selected" but ... every designer has their way of doing things

lol, does that mean I can call myself a designer now then???? I wish...
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
internal navigation, Linking from one page to a specific div in another page. Oak Web Page Design 5 Feb 8th, 2008 22:54
Adding a new page crackafaza PHP Forum 7 Feb 8th, 2008 22:08
Adding music to a Web Page Towbar Introduce Yourself 4 Mar 12th, 2006 17:38


All times are GMT. The time now is 21:47.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43