Forums
This topic is locked
Navagation Bar that is globaly changable
Posted 10 Jun 2004 13:23:07
1
has voted
10 Jun 2004 13:23:07 Kent Steelman posted:
I would like to create a navigation bar that is globaly changable. I am not taking about the format. I am using CSS for this. What I want to do is be able to go to one spot, add an addition navigation section to that area and it would affect the every page on the web site. Here is an example. I have a website where the nav bar has home and about use with their respective links. Now some time later in the future i need to add a "Contact Us" link. I build the page, and now i want to change the nav bar in one location by adding "contact us" to the nav bar with its respective link. Once done all pages will display this updated nav bar. Anyone have any thoughts. Can this be done dynamically with a database? Kent
Wm. Kent Steelman
Replies
Replied 10 Jun 2004 16:28:36
10 Jun 2004 16:28:36 Dave Thomas replied:
easily done using a server side include.
create a new page call it navBar.asp, open it and delete all code in code view so the page is completely blank.
copy your nav bar code into the navBar.asp page and save it. if you look at the page, it may have broken links etc.., this will change once its included in your pages.
now in your pages where you would normally have all your nav bar code, do a search and replace in source code (so you dont have to manually change everything) and replace your nav bar code with
<pre id=code><font face=courier size=2 id=code><b><!-- #include file="navBar.asp" --></b></font id=code></pre id=code>
there is an options in preferences to show contents of in included file in design view, you may need to turn this on, depending on your set up.
now, when you want to make a change, all you need to do is edit the navBar.asp file and your site is updated globally, wherever you have the include statement.
Regards,
Dave
[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
create a new page call it navBar.asp, open it and delete all code in code view so the page is completely blank.
copy your nav bar code into the navBar.asp page and save it. if you look at the page, it may have broken links etc.., this will change once its included in your pages.
now in your pages where you would normally have all your nav bar code, do a search and replace in source code (so you dont have to manually change everything) and replace your nav bar code with
<pre id=code><font face=courier size=2 id=code><b><!-- #include file="navBar.asp" --></b></font id=code></pre id=code>
there is an options in preferences to show contents of in included file in design view, you may need to turn this on, depending on your set up.
now, when you want to make a change, all you need to do is edit the navBar.asp file and your site is updated globally, wherever you have the include statement.
Regards,
Dave
[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
Replied 10 Jun 2004 20:06:24
10 Jun 2004 20:06:24 Kent Steelman replied:
Dave,
Thanks it was so simple it was hard.. didnt think of that. It appears that will also work if you are using CSS... just remove the navbar infor from the div tag and replace with the same information.. hence the navbar will take on the characteristics of the style sheet.
Wm. Kent Steelman
Thanks it was so simple it was hard.. didnt think of that. It appears that will also work if you are using CSS... just remove the navbar infor from the div tag and replace with the same information.. hence the navbar will take on the characteristics of the style sheet.
Wm. Kent Steelman
Replied 18 Jun 2004 15:07:27
18 Jun 2004 15:07:27 Simon Martin replied:
The include file is the method i've been using too. I was wondering what use the library items would have in something like this?
Any comments?
Any comments?
Replied 18 Jun 2004 16:31:01
18 Jun 2004 16:31:01 Dave Thomas replied:
in a lot of years using dreamweaver i can honestly say i've never used a library item, not that i'm aware of anyway.
Regards,
Dave
[img]www.nova-cs.co.uk/DmxAvatar.jpg" border="0">
[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
Regards,
Dave
[img]www.nova-cs.co.uk/DmxAvatar.jpg" border="0">
[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
Replied 18 Jun 2004 16:51:22
18 Jun 2004 16:51:22 Simon Martin replied:
No i've never used them either.
Maybe a new discussion somewhere else on the best uses for library items - if indeed at all?
Maybe a new discussion somewhere else on the best uses for library items - if indeed at all?