Shoutbox

How do I edit multiple html files simultaneously? - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: How do I edit multiple html files simultaneously? (/showthread.php?tid=77086)

How do I edit multiple html files simultaneously? by .Roy on 08-29-2007 at 10:58 AM

Well at my site GetBleach.com I have a navigation menu at the right and I want to add something new to the navigation menu... How do I add that to all the current html pages on my website? I don't want to go through each page and copy and paste thousands of times :P.


RE: How do I edit multiple html files simultaneously? by MattyRid on 08-29-2007 at 11:00 AM

Layers maybe?

I know a few websites I have done recently I have used layers for navigation and sub menus.


RE: How do I edit multiple html files simultaneously? by Nathan on 08-29-2007 at 11:02 AM

Where this is

code:
<h2>Navigation</h2>
<div id="spidnav">
<a href="index.html">Home</a>
<a href="forums">GetBleach Forums</a>
<a href="epicfights.html">Bleach Epic Battles</a>

Add
code:
<a href="your_page.html">Title Name</a>


Add that to all of your html pages

Alternatively you could have one index.php with all of those pages in it but you would need to know PHP.

Otherwise There is no other easy way.

RE: How do I edit multiple html files simultaneously? by .Roy on 08-29-2007 at 11:07 AM

Napbree do you take me for stupid? I just said I don't want to add it to all my html pages. sheesh.

edit: I obviously made the website so I would obviously know how to do it this way T_T, you just want +1 post count...


RE: How do I edit multiple html files simultaneously? by Spunky on 08-29-2007 at 11:07 AM

quote:
Originally posted by Napbree
Alternatively you could have one index.php with all of those pages in it but you would need to know PHP.

If you have php, make one page with all the navigation menu in it and then use
code:
<? include("navigation.php"); ?>
where you want the navigation to be
RE: How do I edit multiple html files simultaneously? by Nathan on 08-29-2007 at 11:20 AM

quote:
Originally posted by .Roy
Napbree do you take me for stupid? I just said I don't want to add it to all my html pages. sheesh.

edit: I obviously made the website so I would obviously know how to do it this way T_T, you just want +1 post count...
Don't be so fucking rude.
I just attempted to help you, the least you could do is show some gratitude.

The way you have done it you are going to have to include a php file or make just one index.php with all of the pages in it and include the header and the footer.

The way spunky love muff showed you would take even more time, becuase you would have to rename your files to be .php.


RE: How do I edit multiple html files simultaneously? by markee on 08-29-2007 at 11:44 AM

If you want to do it in normal HTML then you always have the option of creating the Navigation area or editing it using a common Javascript document.  This method is by far not the easiest, and many people don't seem to appreciate the use of Javascript, but it will work and give you the result you are after.

code:
var element = getElementById('spidnav');
element.innerHTML = element.innerHTML + '<a href="another_page.html">Click this link for yet another page to go to</a>';

RE: How do I edit multiple html files simultaneously? by Matti on 08-29-2007 at 11:49 AM

Markee, don't forget you're "document.(...)"! ;)

code:
var element = document.getElementById('spidnav');

RE: How do I edit multiple html files simultaneously? by markee on 08-29-2007 at 11:52 AM

quote:
Originally posted by Mattike
Markee, don't forget you're "document.(...)"! ;)
code:
var element = document.getElementById('spidnav');

Maybe I just assumed it was encapsulated within a with statement :P.  Also, after having a look at your source code again, it still won't stop you from having to edit all the files because there isn't a javascript file with them yet anyway so you'd need to add that in and you would have to make sure that the function occurred either on load of the body or at the very least after the creation of the DIV.
RE: How do I edit multiple html files simultaneously? by .Roy on 08-29-2007 at 11:53 AM

How do i make a navigation bar in php?


RE: How do I edit multiple html files simultaneously? by Nathan on 08-29-2007 at 11:58 AM

It's quite simple actually,
You could make a switch, where you have all of the pages in one file and then call the navigation and everything else on each case.

If thats what you want tell me and I'll code you something up.


RE: How do I edit multiple html files simultaneously? by .Roy on 08-29-2007 at 12:05 PM

Napbree I don't want all the pages on one page because then I couldn't link people to it and such...


RE: How do I edit multiple html files simultaneously? by Nathan on 08-29-2007 at 12:07 PM

I'm sorting this out on MSN with him so I think it's ok now :)