Up and Running with Frontier Web Site Management
by Matt Neuburg

Prev | TOC | Next


Other Automatic HTML

Automatic links

Frontier does perform a little more automatic HTML for you, which you can prevent if you don't want it. To see an example, go into myFirstSite.default and add at the end this line:

    <p>Comments? Write to webmaster@www.mySite.com</p>

View this in the browser. Notice that, in the browser, "webmaster@www.mySite.com" is a link! In fact, it's a mailto link, linking to webmaster@www.mySite.com. Frontier interprets as a mailto link any expression not inside quotes that is made up of certain basic alphanumeric characters and contains an "@" sign.

If you don't want an email address interpreted in this way, or if you want to use an "@" in some other way, you simply "escape" the "@" by putting a backslash in front of it.

Try it: change the last line to:

    <p>Comments? Write to webmaster\@www.mySite.com</p>

See the backslash? View this in the browser; the backslash is gone, but the email address is no longer a link.

Frontier does the same sort of thing with URLs that contain "//", where this time the "//" is the trigger for the change, and can be overridden by putting a backslash before it. Make the last two lines of myFirstSite.default look like this:

    <p>Comments? Write to webmaster@www.mySite.com<br>
    And don't forget to check out http://www.scripting.com!</p>

View this in the browser. Both expressions are turned into links. But if you say:

    And don't forget to check out http:\//www.scripting.com!</p>

then when you view it in the browser, the backslash is gone, and it isn't a link.

Besides preventing one or both of these expression types from being turned into links by the backslash escapement method, you can also turn the whole mechanism off with the #activeURLs directive; set it to "false" to turn off the mechanism.

Note: Since the backslash is the "escape" character, it is never rendered literally. If you need a literal backslash to appear in the browser, you have to type two backslashes in a row in the Frontier text. Also, it does no harm to put a backslash character before a character that has no special meaning; the backslash will just be removed during rendering, with no further effect.

Character translation

Frontier does one more piece of basic HTML for you. To see it, first go into user.html.prefs and make sure that "charset" is set to "iso-8859-1" and "isoFilter" is set to "true" (all without the quotes -- you can create these if they don't exist already).

Now, in myFirstSite.default, change the phrase "very easy" to "très simple" (to get e with an accent grave, you type option-backquote, then e). View in the browser.

It looks fine; that is, you see "très simple" there as well. But as you know if you have some experience with these things, that's not trivial, because in order to get computers from all platforms to see the same thing with their Web browsers over the Internet, special characters have to be specially encoded. Frontier has done this, replacing our "très" with:

    tr&egrave;s

So, you can type using your Mac character set; Frontier will render in such a way as to make the result legible to all platforms (to the extent that this is possible).

Note: this change you cannot prevent by putting a phrase in quotes or by preceding a special character with a backslash. You can either set #isoFilter to "false" with a directive, or you can use other advanced techniques we won't discuss here to override the conversion for specific characters.

Where to edit HTML

Frontier does generate some more HTML, which we'll learn about. But on the whole, Frontier is not an HTML editor.

Unlike a WYSIWYG-to-HTML converter such as PageMill or Visual Page, Frontier deals with literal text, not character styles. You can turn a word bold in a wp text, but Frontier will not put <b> and </b> tags around that word when it renders it.

And, unlike Nisus or BBEdit, Frontier provides no shortcuts for manipulating HTML tags; for instance, you can't select a word in a Frontier wp text and then somehow surround it magically with <b> and </b> tags. (Not unless you yourself program Frontier to do this.)

With Frontier, you are expected to do your HTML editing by hand, or in some other application, and then do your rendering with Frontier.

If you think about it for a moment, this is a very sensible way for Frontier to work. Frontier applies itself to what it is peculiarly good at; it is pointless for it to reinvent wheels that are superbly implemented elsewhere.

Moreover, you, the user, thereby gain maximum flexibility. Sometimes I create HTML by working in Nisus and using its tag-insertion macros to make HTML tags directly. Sometimes I create HTML by working in Visual Page and using its WYSIWYG features. Either way, I can then just copy the finished HTML into Frontier.

Some programs have a special relationship with Frontier: they can edit Frontier wp text directly, without your having to cut and paste between them.

Of these, the most notable is BBEdit. If you run BBEdit andFrontier simultaneously, then BBEdit has a Site menu that actually belongs to Frontier, and in it are items which drive Frontier's Web site management facilities directly.

The page that you're editing in BBEdit can be a Frontier wp text database entry; to make communication between the two programs automatic, instead of double-clicking your wp text to open and edit it, select it and choose Edit With App from Frontier's Main menu. This will send the text to BBEdit so you can edit it there, and then when you Save from BBEdit the changed text is automatically sent back into the Frontier database.

Still, even if you don't use BBEdit, cutting and pasting is so easy that it is no trouble (I find) to create your HTML in another program and then store it in Frontier. What's more, when you learn about Frontier scripting you can often figure out a way to automate communication between Frontier and your favorite HTML editor.


Prev | TOC | Next

All text is by Matt Neuburg, phd, matt@tidbits.com. This page created with Frontier, 7/8/97; 9:15:58 AM.