Forum Moderators: phranque

Message Too Old, No Replies

Design advice needed

         

lee_sufc

9:34 pm on Dec 19, 2005 (gmt 0)

10+ Year Member Top Contributors Of The Month



My site has approx 70 pages - each of which has a fairly simple design.

For the past few months I have been trying to find a solution to this problem but as yet have had no luck:

IfI wanted to change something on the layout of each page (ie, text in the footer, a different logo etc), is there a way of doing this without having to manually edit each page one by one in FrontPage?

If there is a solution to this I'd be grateful for any advice!

kensav

9:49 pm on Dec 19, 2005 (gmt 0)

10+ Year Member



try a general find and replace in a text editor if you KNOW all the pages are the same in the section you want to change.

Otherwise you should have coded them using a server side sript and includes.

coho75

9:49 pm on Dec 19, 2005 (gmt 0)

10+ Year Member



There are some solutions that will allow you to do a find and replace for the footer and header text (or any other text for that matter). They include, but are not limited to, Dreamweaver, and Textpad. Both of these solutions will find and replace text across an entire directory.

An easier solution would be to use a programming language to include a header and footer. Some popular choices are PHP and Perl.

rfontaine

9:53 pm on Dec 19, 2005 (gmt 0)

10+ Year Member



Ah, the Ol' Frontpage Blues. How about this piece of doggeral:

I built my site with Frontpage
Oh now woe is me
Yes I built my site with Frontpage
An' now I'm feelin' misery

'Cause I got me a whole alot o' pages
Chock full of bloated code
Yes I got me a whole lot 'o pages
Each one a heavy load

I coulda' just used notepad
Spent some time learning to code
Yes I coulda' used just notepad
But my mind's in wysiwig mode.

I built my site with Frontpage
Oh now woe is me
Yes I built my site with Frontpage
An' now I'm feelin' misery

tbear

10:55 pm on Dec 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



As hinted at above, you can use server side includes.
Each page, instead of having a header/footer/index/etc, in the html, has a short include code. You then create your header/footer/index/etc, and include it in the page automatically.
Using front page extensions is one way.
I use php includes, which may need a small addition to your .htaccess file to allow you to use existing .html pages as if they were php.
Once set up, you can modify just the included file and it will appear on all pages.
This system requires no browser effort since it is all done as the page is being called from the server.

Example: instead of the code for your header insert the following - <?php require "header.inc";?>
then create a file with the header code and name it 'header.inc', I use a html editor for this (arachnophilia) you may also copy and paste the code into notepad and save as .inc.
Add this to you .htaccess file on the server (must be apache):
AddType application/x-httpd-php .htm .html
and away you go.

It is also search engine friendly:)
Of course, initially you will have to go through the search and replace business to set it up omn existing pages. This can be done in phases depending on your boredom level ;)
Added:

Another thread related to this issue [webmasterworld.com]

bennymack

1:03 am on Dec 20, 2005 (gmt 0)

10+ Year Member



Headers and footers are so 1996 ;)

But seriously, the best way to implement an easily maintainable layout system is to have both your header and footer in the same file. This is because your opening and closing tags are then in the same file the way they are meant to be.

Fortunately there is a framework that comes with this ability built in.

It's called Mason [masonbook.com].
Just read the first few paragraphs of the book maybe do a search for 'header and footer'.

It's perl based, extremely robust and flexible. If you can think of it, you can do it with mason.

/plug ( no affiliation )

j_h_maccann

1:41 am on Dec 20, 2005 (gmt 0)

10+ Year Member



This inquiror isn't getting accurate information.

FrontPage has at least two ways to make such changes. One is a very smart global find and replace, which can find regular expressions and material within specified tags, before and/or after specified tags, etc. Much better than a text editor because it understands the HTML. (Works in HTML code view.) This is for making unplanned global changes.

For anticipated global changes, there is another system for including "one page in another" which actually includes parts of pages from independent files (such as a footer file which is maintained in one place and inserted in all the pages of a site) automatically fixing up relative references. You give the page fragment a name (such as "footer.htm") and then in each page where you want that code included you just write its name in a special comment, like

<!--webbot bot="Include" U-Include="includes/footer.htm"
TAG="BODY" -->

which means to copy and "relocate" all the code within the <BODY> tag of the page "footer.htm" in directory "includes".

A single page can be assembled from over a hundred fragments in separate files, and a fragment can be used in hundreds of pages (in my personal experience) with very good performance. All of the includes are checked after insertion, so errors such as broken links are detected and reported before the site is uploaded to the server.

Unlike "server-side includes" which are done when a page is requested, "FrontPage2003 includes" assemble the parts of pages into the files once, before FTP'ing to the server. The server can be a Unix/Linux server or a Windows server, and does NOT need to have any FrontPage Extensions installed; the server doesn't even know that its static pages were assembled by FrontPage2003.

Microsoft has free video training which includes both of the above techniques:

[office.microsoft.com ]

The misinformation that the only way to update the repetitive parts of a FrontPage2003 site is to edit every page individually isn't very plausible; no one could ever build a real site that way.

coho75

2:05 am on Dec 20, 2005 (gmt 0)

10+ Year Member



The misinformation that the only way to update the repetitive parts of a FrontPage2003 site is to edit every page individually isn't very plausible; no one could ever build a real site that way.

I don't think anybody suggested that the poster should do this. Everybody gave solutions that will work. They are all plausible and accurate.

lee_sufc

9:30 am on Dec 20, 2005 (gmt 0)

10+ Year Member Top Contributors Of The Month



thanks for the all advice guys

TerryG

11:31 am on Dec 20, 2005 (gmt 0)

10+ Year Member



I use a SR32 ( do a search for it,sorry).
I was asked to redo a web site made from Frontpage 200+pages, i knew this would kill me but with ssi and sr32( a form of grep) it went quite well and fast.
sr32 as i said is a form of grep that can search and replace any thing on your drive and after it finds it will ask you if you want to replace all or step through it.
anyway i built a php page that was the basic format for all of the main pages and ssi for the content(could have used php for content also but didnt), now its simple to just pop in and change one thing and have it work on the rest of the pages, ok so 5:30 am and i am rambling sorry..