Up and Running with Frontier Web Site Management
by Matt Neuburg
Author of the book Frontier: The Definitive Guide
We're now ready to build our own first Web site. From the Web menu, choose New Website, and when the dialog box appears, type "myFirstSite" (without the quotes) and hit OK.After a while a table representing your site appears:
What's in your site table initially? It contains no actual Web pages as yet. What you see are resources that will be in common for all Web pages you create within this site (that is, in this table, or subtables thereof).
Anything you add to the site will be considered a Web page, unless it meets certain special criteria that tell Frontier it's something else. Everything already in the site meets those criteria: the items all have names that begin with the "#" symbol. This tells Frontier that they are not actual Web pages, but things it should use later on, while rendering a Web page.
We'll learn about all the entries you see here, in the course of this tutorial. Right now, though, let's start with #ftpSite. It's a table, and we'll look inside it in a later chapter. But at the moment, it's the location of this table that's the important thing. Your site must have exactly one #ftpSite entry, and that entry signifies, by its mere presence, the top level of the site.
Why is this important? In the database, we've got tables within tables within tables. You can make tables within this new site table, and they will signify folders to be created on disk. How will Frontier know just which table is the main one for this site, containing and representing your site as a whole? The presence of #ftpSite entry tells it.
A moment ago I said that the resources you see in a new site -- the "#" entries, the glossary table, and the tools table -- are "in common for the whole site". What I mean is: changing one of them changes all the pages in the site. This is what gives the site its uniformity.Look inside the #prefs subtable, where you'll see the four entries alink, bgcolor, link, and vlink. You probably recognize these from your knowledge of HTML; they represent the hex color values that will be used for active links (as the user clicks a link), window background, links, and already visited links.
Frontier, when it renders your Web pages, will construct a <body> tag using these values as parameters; and it will do this for every Web page in your site, so that they have a uniform look. (But don't worry: it is possible to override these values for one particular Web page, or a particular set of Web pages. We'll learn about that in a little while.)
So, now is our chance to make some decisions about how we want our pages to look!
The particular hex colors that have been chosen are mere suggestions; if you don't like them you are perfectly free to change them. Furthermore, you are free to introduce values for certain other <body> tag parameters.
Suppose, for example, you wanted this Web site to have its pages be black with white text. First, change the bgcolor value from FFFFFF to 0. (If you type it as "000000", with the quotes, you'll get a nice rgb-looking string.)
That will make your pages illegible because you'll have black text on a black background, so you need to supply a value for the color of the text too. Make a new string entry in the #prefs subtable called "text" (without the quotes), and give it a value of FFFFFF.
Note: This is an important moment not to get confused about what table you're in. When you make a new item in a table, it is made in the same table as the currently selected item. If, in websites.myFirstSite, you select the "#prefs" line and create a new item, it will not be created inside the #prefs table -- it will be created in the same table as #prefs, namely websites.myFirstSite, which is not what you want. Be sure to select a line inside #prefs before creating the new item.
Another note: Hex color values got you mystified? Forget them, then! Jump to system.verbs.colors, where you'll find 140 colors listed by name (as originally defined, I believe, for X Windows). You can use these color names instead of hex values in any directive that calls for a color. So, for alink, bgcolor, link, vlink, and text you could type "green", "black", "blue", "purple", and "white" (without the quotes) and get just the same result; Frontier substitutes the hex value as you confirm the change by hitting Enter [keypad-enter].
I know you're anxious to see whether pages really do come out with those colors settings you've been changing, so let's try it! Your browser is presumably running, from the last chapter; so we're ready to go.
Our first page will go at the root level of our site, which is websites.myFirstSite. Remember the note above about being careful where you are when you create a new table item. Make sure to create this item in websites.myFirstSite, not inside its #prefs subtable.As we already saw with websites.samples.randomStuff, a Web page can be a wptext; so make a new wptext item in websites.myFirstSite, using New Text (which means wptext) from the Table menu. We'll make the first page our site's main page; this is often called "default.html", so in the dialog, name the wptext "default" (without the quotes). Notice that you do not put ".html" after the name; Frontier will add this when it renders the page.
Note about names: When you give a name to a Web site table or a new object within a Web site table, make sure it contains no spaces or punctuation. It should consist entirely of letters and numbers, and should begin with a letter. If you don't obey this injunction, certain features of the Web site management system may break, and you'll be mystified, or annoyed, or frustrated, or some other emotion you were probably trying to avoid that day.
Into websites.myFirstSite.default, type this:
#autoparagraphs true #clayCompatibility true #title "Welcome!" *** Welcome! This is my Web site. I hope you like it here. *** Notice. This Web site is under construction. But, thanks to Frontier, constructing it will be very easy!Notice the double-returns between paragraphs. That's important for the moment. Also, don't just copy and paste from the text of this tutorial: type it yourself. It is crucial that each line have no indentation or spaces before it; for instance, in the first line, "#" must be the absolute first character of the line (and it must be the very first line).
Now choose Preview Page from the Web menu, and after a few moments you'll see a Web page appear in your browser. If you chose to follow my suggestion about making this site's pages white text on a black background, it might look like this:
Congratulations! You've rendered with Frontier your own Web page that you created yourself. You might like to play now with the various color values and render the same page again (and again) to see what it looks like.
Go nuts! Instant gratification is part of the fun of Frontier...
All text is by Matt Neuburg, phd, matt@tidbits.com.
For information about the book Frontier: The Definitive Guide, see my home page:
http://www.tidbits.com/matt
All text copyright Matt Neuburg, 1997 and 1998. ALL RIGHTS RESERVED.
No one else has any right to copy or reproduce in
any form, including electronic. You may download this material but you may not post it for others to
see or distribute it to others without explicit permission from the author.
Downloadable versions at http://www.ojai.net/matt/downloads/webTutorial.hqx and http://www.ojai.net/matt/downloads/webTutorial.zip.
Please do not confuse this tutorial with a certain other Frontier 5 tutorial based upon my earlier work.
This page created with
Frontier, 2/11/2000; 7:00:05 PM.