A Script for the NewbiesThey ganged up on me on the Frontier-newbies mail list and made me write this script!
It's OK because I like to write scripts. I got Thea's permission (she's in charge of the Newbies list) to post a pointer to this page.
So now you know why I wrote this script, so what does it do?
What it does
Imagine you have a website table in Frontier with a few sub-tables, and a few top level pages. You want to build all the top level pages, but you don't want to build all the pages in the tables. I've wanted this feature myself, but unfortunately Frontier, as we ship it, doesn't have a command that does this.
No problem, it's easy to write such a script. That's what my script does. It works just like the Publish Table command in the Web menu, but instead it only publishes the top level items.
How to get it
It's baked into the HTML source of this page. If you're curious, do a View Source of the page and scroll to the end. You'll see a lot of funny stuff at the end of the page inside a comment. That's the script. Frontier knows how to read that stuff. (These are called fat pages, it's how we distribute new bits for Frontier users. It's important that you know how to get the good stuff out of a fat page.)
First, in your web browser, with this page visible, choose the Save As command in the File menu. Save the page in your Frontier folder. (Some browsers offer a choice of saving as Text or saving as Source; if you get that choice, you want the Source.)
Then switch into Frontier, and choose the Open command in the File menu. A dialog box appears, asking where you want to save the script. It suggests workspace.topLevelTablePublish. That's the right place. Click on OK.
Coool. Now you have the script. Let's link it into the menu bar.
Linking it into the menu bar
Right after the Bookmarks menu you'll see a menu with your initials as its name. On my system it's called DW. It'll be different on yours. We call this menu the Custom menu.
At the end of this menu is a command called Edit Menu. Choose this command.
An outline opens containing the commands in your Custom menu. Decide where you want the new command, click on the line just above where you want to enter the command, and press Return (Enter on Windows).
Then type Top Level Table Publish... followed by Enter (F2 on Windows).
Double-click on the gray triangle next to the new command. A script editing window opens. Type workspace.topLevelTablePublish () and close the window. You just entered a call to the new script in your workspace table.
Look in the menu bar. You have a new command now! Right on.
Using the command
It's just like Publish Table. Find a website that you want to try it out on. If it doesn't work, report bugs on the list. Hope you like it!
About the Custom menu
This is the place to add new commands that are just for you. My custom menu has commands in it that add new stories to the DaveNet website, open the current day's outline for Scripting News, and other goodies that only I care about.
When I wish for a feature that Frontier doesn't have, very often it becomes a command in this menu.
See you on the list!