By Bradley Peters
Instructions
Note: The OPML format uses a tag attribute to store the contents of the outline nodes which means that any HTML and quotation marks must be represented as HTML entities (e.g. "). Presently the Weblog and WeblogView Page types do not support the necessary translation -- "entifying" -- for this. A planned upgrade to support Conversant message macros in these page types (which support entifying) will remedy this problem.
Create Template
First, you'll need a wrapper template similar to the one used for RSS documents. So in the template editor create a new full page template -- call it "OPML Wrapper", or something like that -- with the following contents. (Obviously, you should probably change the Kermit the Frog stuff.)
<?xml version="1.0"?>
<opml version="1.0">
<head>
<title>Roving Reporter Weblog Outline</title>
<dateCreated><!--#weblogTimestampNST--></dateCreated>
<dateModified><!--#weblogTimestampNST--></dateModified>
<ownerName>Kermit the Frog</ownerName>
<ownerEmail>kermit\@muppets.com</ownerEmail>
</head>
<body>
<!--#pageContent-->
</body>
</opml>
Create WeblogView Page
Then, in the site structure editor create a new WeblogView page called "outline.xml" (or whatever you choose, it's not really important).
Edit Page Properties
Finally, edit the properties for outline.xml.
- On the basic tab set the Template property to "OPML Wrapper" (or whatever you named the template that you created before), and the MIME Type property to text/xml. All the other properties should be fine as they are.
- On the options tab select the weblog you want to display as an OPML outline.
- On the templates tab set the No. of Days property to "1" and use the following templates:
- Text to insert between dual carriage returns.
"/><outline text="
- Day Template
<!--#weblogdaytext-->
- Item Template
<outline text="<!--#subject-->">
<outline text="<!--#body-->"/>
</outline>
Problems and Confusions
I don't really understand how <dateCreated> and <dateModified> are being used for UserLand's OPML version of Scripting News. I think that theoretically from reading the specification the latter should be the time of the first posting of the day and the former should equal that of the most recent, but this doesn't appear to be the case. Furthermore, I don't know how to generate a properly formatted timestamp ("Fri, 28 Sep 2001 14:28:04 GMT") for when the document was created so I've used the <!--#weblogTimestampNST--> macro for both tags.
According to the specification all the <head> elements are optional so I've left the window display elements -- <expansionState>, <vertScrollState>, <windowTop>, <windowLeft>, <windowBottom>, <windowRight> -- out because I don't know how to use them.
Scripting News OPML has a new attribute (that's not in the specification) called "created" that appears to contain the posted time for that item. Again, I don't know how to get the proper format (I don't think the <!--postedTime--> macro does this) so I've left it out. Also, I don't know if macros will work in the "dual carriage returns" template (which would be required to put the created attribute in all the outline tags). And, in any case, I think the input box for that is too small to hold this much information.
Credits
The OPML weblog concept used here is credited to Jim Roepcke who first demonstrated it to illustrate the then newly announced WeblogView Page type. And, as always, a multitude of thanks to Macrobyte Resources for creating the Conversant platform on which all of this is built.
Revision History
26 September 2001
- initial draft version published
12 October 2001
- Note about waiting for new weblog page plugin added
- Various formatting adjustments
- Links added
- "bottom-matter" (credit, revision, and copyright sections) added
Copyright
This document is copyright © 2001 Bradley D. Peters.