Updated: 4/2/02; 10:36:29 PM.
Postcards From the Cutting Edge
Max Christian Hansen's wild ride on the roller coaster of technology business.
        

Tuesday, April 02, 2002

Fun with Frames. The problem I face with my business web site is that it uses frames, and frames are a pain in the neck.  Problem is, they do some things you can't do any other way.  The primary feature I wanted that called for frames was to have a portion of the screen that could scroll without the rest scrolling.  I also got tired of attempting table hacks that required more effort than struggling along with the frames.

Webmasters know that Google and other search sites' crawlers can't read inside of frames.  They can read a framed document if you put the contents of the page within a <noframes> pair, but that isn't what actual readers of the site will see, unless you take pains to make it so.

I took those pains, and pains they were indeed.  My site has been tremendously hard to modify, and this was what I most wanted to change by moving it into Frontier. 

The Problem  In order for Google to find what readers will see (and only what you want readers to see), you must do three things:

  • Create a data file of the content for each discrete page you want framed.
  • Create a frame document for each page of content you want to show.  So far, these many frame pages are (or can be) identical except that each reads in a different source file created in step one.
  • Copy into each frame file the contents of the content file associated with it, inside a <noframes> </noframes> pair. 

Already you can see the problem.  You have to maintain two identical pieces of content for every page.  Why I did this by hand when I had Frontier sitting idle on my machine I don't quite understand, but until this weekend I did.

The problem is further complicated by the fact that what goes into the <noframes> section is somewhat different from what's reguired for the content file.  

What I Did

First, I put the code for the basic frame document into my #template; it's going to be the same for most documents on the site.  This template doesn't have a {bodytext} macro in it anywhere.  Rather, it has a macro that assembles one of the <frame> tags, the one that will have the variable content, with the URL of the content page in the "src=" bit. 

The template also needs to have the HTML for the noframes section.  Withing this section is an include, calling for the meat of the content file, without that file's unnecessary opening and closing tags. 

(To be continued when I'm awake again...)   12:57:53 AM    


Buy the Book. It was a decent day working with Frontier. I'd bought Frontier back when version 6.0 was new.  I went through the tutorials that came with it.  So far so good.  But when I tried to do anything really interesting, it was just too much work.  I didn't know where the mailing lists or discussion groups were, and nothing was intuitive. 

Radio got me excited when I realized how easy it was to publish.  It was even more exciting to think that the full power of Frontier was behind it, and that I could do interesting things with my blogs, like digesting them into emails a la Scripting News. 

This meant I'd have to start, once again, to learn Frontier. Before getting into scripting I decided to pick up where I'd left off in '99 -- web site management.  So yesterday I started moving my web sites into new databases in Userland 8. 

I had gotten a copy of Matt Neuberg's book in the mail on Friday and had spent a chunk of Saturday reading it.  Sunday (yesterday) I got started.  I moved a couple of the easy sites, improving them as I went.  Late in the day I started on the only tricky site I manage, the site for my business, the Max Hansen Group.  Next post will be about some of the tricks I've pulled off working with that site.   12:20:18 AM    


© Copyright 2002 Max Christian Hansen.
 
April 2002
Sun Mon Tue Wed Thu Fri Sat
  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        
Mar   May


Click here to visit the Radio UserLand website.


Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.