Forum Moderators: open
I have used tables to convert the old top and side navigation which was in frames into a template with a middle section where I'd like to merge what was formerly the "contents" of the main body of each page in the framed web site.
Using MS FrontPage 2002, is there a way to automatically merge the thousands of pages into the template (or coversely apply the template to all the pages) "en masse"?
<table border=1>
<tr>
<td colspan=2>top nav here</td>
<!--td-->
</tr>
<tr>
<td><br>side<br><br>nav<br><br>here</td>
<td rowspan=2>merge html document contents here</td>
</tr>
<tr>
<td> </td>
<!--td-->
</tr>
</table>
TIA,
Jas0n
Frontpage on its own, as long as that part of the HTML is unique, and the same on these thousands of pages you can use the EDIT/REPLACE function. Its under the "edit" bit at the top.
First, you want to make a .htm page to include this replicated info. Then, copy and paste the code you mention into the edit/replace box and tick the box for it to make the changes site wide. Make sure that their is no similar HTML in "other parts" of the page...ie it has to be unique so you know what bits are getting changed.
Replace it with <!--webbot bot="Include" U-Include="pathtoyournewfile.htm" TAG="BODY" -->
Since you say its over thousands of pages, you will have to make sure you specify an absolute path to your include file....different levels of folders will not work with the relative URL. Its either that or performing the above for each folder as opposed to doing it in a "oner" sitewide
hope this helps
Each of the thousands of pages has the main contents in a table that starts right after the <BODY> tag and ends right before the closing </BODY> tag.
To create a universal navigation across these pages I need to:
1) add some Style information above the body tag and replace the existing body tag in each of the thousands of documents;
2) add table elements/HTML after the new body tag to enclose the existing contents of the page in a table cell;
3) add closing table cell/HTML right before the end body tag (this is the closing of the cell/table that will enclose original page contents).
So, I should be able to do this if I can just globally replace the <BODY> and </BODY> tags (because when I replace the tags themselves I could add more HTML right above/below the tag as needed).
I've got my fingers crossed and am going to try this Find and Replace misssion. It just seems too simple.
I don't know if you're into using CSS and Server Side Scripting, but, that is what I do in Frontpage.
It just so happens that for this site im doing, its PHP :) You could maybe use
ASP since your using frontpage.
The one I used for a windows server based site with ASP
<!--#include file="../yourinclude.inc"-->
There's probably more ways to present your includes. For all the design
orientated elements you might want to look into CSS, if you don't know about it
already.It is pretty easy to make CSS in frontpage too. just save a file with
the .css extension....open it with frontpage in your web, and go to format >
style. This formats the code you need for CSS, that can affect your design
site-wide.
"thats the way I been doin it" ;) It may not be the best way, or there may be faster ways.
It just sounds like you want to design the whole site and burst out of those frames. If you made all the include files that presented all this duplicated stuff across your site, then you could start from scratch and maybe even consider cutting unnecessary code. After all, you wanted to break out of frames....maybe you could cut down file sizes while you're at it.
Hope thats what you are looking for.....
When I went to find/replace the old Body tags with my new ones I had to search on "<body" because the pages had variations on what was in the total Body tag. This meant that when I did the Replace I had the left over schmutz from the end of the old body tag (everthing up to the ">").
Plus the replace cell wouldn't hold all the text I wanted to Replace with.
I've used the Includes with ASP before for navigation headers, and common info (like checking user login info for private pages).
I wanted to use plain vanilla non-frame HTML for search engine friendliness. I know that database driven ASP sites with URL's that have files that end in "?" and other odd characters are a problem for spiders. How bout plain old filename.asp files with Includes?
I've been trying to minimize my reliance on CSS because I thought there were potential inconsistencies across browsers. We just use a few lines of Inline <STYLE> attributes to do rollovers in the navigation.
No matter what option I choose its starting to look like I may have to edit each and every one of the thousands of pages anyway.
Thanks,
Jas0n
No you are fine there. Its all "server side" so neither robot nor human gets to see what your code decides to include on the page
>>No matter what option I choose its starting to look like I may have to edit each and every one of the thousands of pages anyway.
I wouldn't give up so easily. The fact is, the more you find out about computing in general, the more you know there is a better way to do things. You already know that there is certain aspects of the site (ie the framed stuff) that is consisten. Put it in an include file. You also may want to have consistent navigation throughout your site. Also, all that code that is mandatory, like your DTD the <html><body> and meta charset tag can also be in its own include.
The bottom line is, if you do that now, you won't have to do it a second time. The include stays the same, forever, just what you want across a site sometimes IMO.
In regards to CSS validation, its always worth checking the W3C validator and ask questions about specific CSS attributes in the HTML design forum. Believe me, there are probably people in here that know more about CSS than the creators of it :)