last updated:

current version: 1.0a1 (change list)

A while back, I realized that one of the biggest problems with Manila is that every page is rendered through the exact same master template.[1] This means that, if you want a pop-up window rendered out of your Manila site, or a page with a different background color, or without the stuff that you’ve framed every other page with, you’re out of luck. A few days later, though, I realized that I could change it, and out of that realization came this, the altTemplate plug-in.

Once again, if you install this plug-in, I’d love it if you’d drop me a message to let me know what you think, and if you have any problems.

What does it do?

This plug-in lets you create alternate templates, and then render messages through those templates. These templates can be nearly-identical, or completely different, than your current site template, and you can create as many of them as you want (limited only by memory requirements of the machine running Frontier and Manila). For an example, check out this very page rendered through a completely blank template.

How do I use it?

It’s a standard Manila Plug-In, which means that it needs to be installed on your Manila Server, and then enabled for each site that wants to use it.

If you control your own Manila server, then this is easy — you can download and install the plug-in yourself. If your site is on a public Manila server that you don’t control, then you need to ask the administrator of that server to download and install the plug-in, and then you can enable it on your site.

There are two downloads, both very small — a ZIP file (6 Kb), a StuffIt archive (6 Kb, thanks to Marek Behr), and a straight Frontier root file (25 Kb).

Installing the plug-in

  1. After downloading, and (if necessary) unzipping, altTemplate.root, put it into the apps subfolder of Frontier’s Guest Databases folder.
  2. Open altTemplate.root in Frontier.
  3. With altTemplate.root frontmost, go to Frontier’s Server menu and choose Add to user.databases…. Affirm that this is what you want to do, and then close the user.databases subwindow once it comes up.
  4. Run the script in altTemplate.root at atSuite.install — this will install and register the plug-in. That’s it for the installation.

Updating the plug-in to the latest version

The altTemplate plug-in supports Frontier’s standard subscription mechanism, so you can update it from within Frontier. Make the altTemplate.root window visible and bring it to the front, and then choose Update altTemplate.root… from the Main menu.

Enabling and setting up the plug-in on a site

Log into the site as a managing editor, and choose Prefs from the editors-only bar at the top of the page. Click on Plug-Ins in the left-handed navbar once it comes up, and then check the checkbox next to altTemplate. Submit the form.

Now, the editors-only bar at the top of the page has an added entry, altTemplate, which will take you to the configuration page for the plug-in. Click on it.

This next page is the main altTemplate configuration center; from here, you can add, edit, or delete templates, and you can manage the process of rendering messages through templates (called “template associations”).

Adding a template: when you enter a name and click on “create template,” the template record will be created in your website database, and you’ll automatically be taken to the page to edit the new template. Easy cheesy.

Editing a template: choose a template from the pull-down, and then click on “edit template.” The edit page is very similar to the template section of the Manila Advanced prefs page; you enter the template the same way. The difference inherent in altTemplate is that the only macro required is the {bodytext} macro; I’m even toying with eliminating this, as well. Click on “submit template” when you’re done.

Deleting a template: this is the easiest option; all you have to do is choose the template and click on “delete template.”

Managing associations: this is where the heart of things happens. Clicking on “manage associations” brings you to another page which allows you to add, edit, and delete the tying of templates to specific messages.

Adding an association: in order to add an association, you need to know its message number in the discussion group. (In addition, right now, you can only associate stories with alternate templates, so you’ll have to promote a message to the level of story before you can add the association.) Type in the message number, choose the template you want to use from the pull-down, and type in a pathname with which you’d like to access the message rendered in the new template. The pathname will be added to the end of a URL to call up the association; see below, in the Accessing an association section, for how it’s used in the URL.

Editing an association: in the table at the bottom of the page, you’ll see all of your associations; clicking on “EDIT” will move the information about the association up into the “add/edit association” section of the form, and you can change it as you wish.

Accessing an association: this is the key to the whole plug-in — the URL that you use to render the message through the new template. In the same table at the bottom of the page, the leftmost column contains all of the pathnames, and each is a link that takes you to the message rendered in the chosen template. Click on it to see what happens. In a nutshell, though, the URL format is as follows:

http://some.host.com/at/view$pathname

Deleting an association: in the same table, you can click on “DELETE” and the association will vanish.

That’s it — the docs are a bit skimpy so far, since the plug-in is still in alpha testing.

What if I find a problem?

You can mail me with any problems, or post to the discussion group, and I’ll do everything I can to fix ‘em. Once fixed, you can just update your altTemplate.root to get the updates.

Footnotes

[1]That is, every page except for the home page, if you enable the home page template option

Comments

Jason,

I haven’t yet tried the plug-in, but it sounds very intriguing. For easier downloading from a Mac, I fixed the file/creator type and made
a StuffIt archive:

http://manila.mems.rice.edu:81/gems/behr/altTemplate.sit

- Marek

• Posted by: Marek Behr on Nov 29, 2000, 5:39 PM

Marek:

Thanks a ton — I appreciate the help!

/jason

• Posted by: Jason Levine on Nov 29, 2000, 11:12 PM
Please note that comments automatically close after 60 days; the comment spammers love to use the older, rarely-viewed pages to work their magic. If comments are closed and you want to let me know something, feel free to use the contact page!