Up and Running with Frontier Web Site Management
by Matt Neuburg
Author of the book Frontier: The Definitive Guide

Prev | TOC | Next


Getting Comfortable With Outlines

Hierarchical text

Before we can proceed to our exploration of the Root Window, we need to understand about one of Frontier's most characteristic ways of arranging information -- outlines.

An outline is a way of storing, viewing, navigating, and manipulating snippets of text hierarchically. (I say "snippets" because in Frontier every line of an outline can be no longer than 255 characters.)

Outlines are great ways of keeping information readily accessible. They are also put to many different uses in Frontier. In constructing Web sites with Frontier, templates (we'll learn what they are later on) are often outlines, and Web pages can be stored in Frontier as outlines so as to get Frontier to do some clever automatic generation of HTML. UserTalk scripts are outlines. Menus, which are customizable in Frontier, are represented by outlines. And the database, as represented in the Root Window and its children, is an extended variant of an outline called a table.

So you need to be comfortable with outlines in order to do just about anything in Frontier.

To see an outline, choose Jump from the Main menu, and into the dialog that appears type "examples.universe" (without the quotes) and hit OK. A window will open containing an outline.

From the Outliner menu choose Expand Everything, thus revealing the whole structure of the outline. It looks like this (as with the Root Window, you can change the font and size of the whole outline if you wish):

Think about how this outline is organized. A line that is indented to the right with respect to the line above it is subordinate to that line -- that line "contains" the indented line. Here, the outline uses this notion of "containment" to reflect how the objects it names actually contain one another.

The Milky Way (our galaxy) is inside the Universe; our Solar System is inside our galaxy; the Earth is within the Solar System; North America is one region of the earth. But Canada and the United States are not inside one another; they are of equal status, independent nations within North America. Thus, their indentation is the same as one another.

Similarly, California, Michigan and New York are states within the United States, so they are at the same level as one another too. The only reason there is a gap between California and Michigan is to make room to show the two items listed as being inside California, namely the cities Palo Alto and San Francisco.

Now double-click the triangle to the left of the first line, Universe. Oops? Where did everything go? It's still there, but it's now hidden ("collapsed", we like to say); that's what the changed color of the triangle indicates. A dark triangle means the item possesses collapsed (hidden) sub-items; a light triangle means the item either has no sub-items or is expanded already.

Double-click the triangle to left of Universe, and its immediate subordinate line, namely just the line Milky Way Galaxy, is revealed ("expanded"). Double-click its triangle. And so on.

Keep playing in this same way, expanding and collapsing lines by double-clicking triangles, until you are clear on these notions.

Already you can see why an outline is useful; it can contain lots and lots of material, yet because that material is arranged in collapsible hierarchies you can see as much or as little of it as is convenient at any particular time. This is what makes an outline a useful hierarchical viewing mechanism.

Working with outlines

Here are the things you need to know about outlines. Try them out; play with this outline to your heart's content. Feel free to edit it and change it around in any way.

Double-clicking to the right or left of a line (or on its triangle, as we've seen) collapses or expands it. You can also use keypad-minus to collapse the selected line, keypad-plus to expand it, and keypad-asterisk to expand it fully (so that no material subordinate to it at any depth remains hidden).

Distinguish next between the notion of selecting or working with an entire line, as an element of an outline, and that of editing the text within a line. There are two modes corresponding to these two ways of selecting: selection mode (for working with a line as a whole) and content mode (for editing text). Hitting Enter [keypad-enter] toggles between selection and content mode, though when you're in selection mode you can just start typing and you will immediately be placed in content mode (and what you type will replace the contents of the line).

In selection mode, the up- and down-arrow keys move among items at the same level of indentation (for example, in the above picture, the down-arrow would take you from California to Michigan, skipping all the contents of California because they are at a deeper level of indentation). They are restricted to movement within the same "bundle" (that is, items which are sub-items of the same thing).

The left- and right-arrow keys move up and down among all the items. Option-left-arrow takes you to the "parent" of the currently selected line; command-left-arrow takes you to the ultimate "parent" of the currently selected line; command-up-arrow and command-down-arrow take you to the first and last items of the bundle you're already in. [Can't find a Windows equivalent of any of these.] Command-option-left-arrow [control-left-arrow] takes you to the "parent" of the currently selected line and collapses its subheads. There are other navigational shortcut keystrokes but those are the most important ones.

Here's a summary:

toggle content / selection mode    Enter [keypad-enter]
collapse or expand a line          dbl-click triangle
collapse a line                    keypad-minus
expand a line                      keypad-plus
expand a line fully                keypad-asterisk
up/down within bundle              up-arrow, dn-arrow
full up/down within bundle         cmd-up-arrow, cmd-dn-arrow [Mac only?]
up / down absolutely               lt-arrow, rt-arrow
to parent line                     opt-lt-arrow [Mac only?]
to ultimate parent                 cmd-lt-arrow [Mac only?]
to parent line and collapse        cmd-opt-lt-arrow [ctl-lt-arrow]

Moving items around

Command-U, command-D, command-L, and command-R [ctl-U, ctl-D, ctl-L, ctl-R] move the currently selected line up, down, left, and right respectively.

There are two important things to understand about this. First, whenever you move an item, you move all its sub-items along with it, whether they are showing (expanded) or not; that's what makes an outline a useful hierarchical storage mechanism. Select United States and move it up, to see how it works.

Second, you can't move anything "up" or "down" out of the bundle it's already in; to do that, you must move it "left" or "right". You can only move something "right" if there is an item immediately above it at the same level, and it will then become a sub-item of that item -- its last sub-item if it already has sub-items.

If you move something "left", it may appear to leap wildly (for instance, imagine that California secedes and becomes a separate state, so try moving it left), but this makes perfect sense; it is moving to the next available slot at the next higher level of indentation.

You can also drag an item to another place. Try doing it; it takes some getting used to, but after a while you realize that the little arrow is showing you where the item will go if you release the mouse at any given moment.

You can also Copy or Cut an item and Paste it elsewhere; it will be pasted "down" from whatever is currently selected when you say Paste. Pasting a line or lines never deletes anything, the way pasting particular text can.

Notice, too, that you can select multiple items simultaneously. Shift-clicking selects a stretch of lines (typically within the same bundle); command-clicking (ctl-click) selects additional lines anywhere. You can then move all selected lines at once by dragging or by cutting and pasting (which also brings them together) or by command-U etc. (which does not). Try it! This is one of Frontier's most brilliantly implemented features.

There are a couple of useful time-saving tricks when you want to rearrange large hierarchical blocks. Select California and choose Promote from the Outliner menu. Its subheads move up to the same level as itself. Now choose Demote from the Outliner menu. Everything below California within the same bundle becomes its subheads.

Ready for a test? Okay; how quickly can you rearrange the outline to make it look like this:

New York has seceded from the union, and California has broken off to form a separate continent!

Editing lines

We have said nothing so far of editing the contents of the actual outline items. One important thing to know is that (as we already said) Enter [keypad-enter] toggles between selection mode and content mode (and you can also just click in the text of an item to start editing). Also, hitting Return [enter] always creates a new item, even if you hit it while you're in the middle of editing an item.

In content mode, the Delete key [backspace] removes the previous character, but in selection mode it deletes the current item -- and all its sub-items, so watch your step! (If you delete something you didn't mean to, you can Undo if you haven't done anything else yet.)

Note: if you hit Shift-Return [shift-enter] you get a new line of a special type called a "comment", marked by a chevron character instead of a triangle at its left. Comments are very useful, especially in scripts; but at the moment it will be best not to have any, so if this ever happens to you, just delete the item, or convert it to a non-comment by hitting command-backslash [ctl-backslash].

Summary time:

move a line or lines           cmd-U, cmd-D, cmd-R, cmd-L
                               [ctl-U, ctl-D, ctl-R, ctl-L]
select contiguous lines        shift-click
select non-contiguous lines    cmd-click [ctl-click]
new line                       Return [enter]
delete in selection mode       select, then Delete [backspace]

Test time; quick, make the outline look like this:

That's your lightning introduction to outlines, one of Frontier's most powerful features.


Prev | TOC | Next

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; 6:59:50 PM.