x
 
Create New Page
 View Previous Changes    ( Last updated by Lisa Wess )

OPML

Question

How can I output weblog-based information to OPML?

Answer

This can be really useful, especially having used a weblog for a linklist. LissaKay has supplied a template for this purpose.

Please note that this uses the fields as dilineated in Linklists and Blogrolling. You will also want to replace “AuthorName” and put in your email address in the proper place.

<?xml version="1.0" encoding="ISO-8859-1"?>
<opml version="1.1">
<
head>
<
title>My Link List</title>
<
dateModified></dateModified>
<
ownerName>AuthorName</ownerName>
<
ownerEmail>you+SPAM@you.com</ownerEmail>
</
head>
<
body>
{exp:weblog:entries weblog="links" sort="asc" limit="999"}
<outline text="{title}" type="link" url="{urllink}" title="{title}" target="_blank" />
{/exp:weblog:entries} </body>
</
opml>

LissaKay also includes a note on usage: I had to convert all the angle brackets to ASCII entities, otherwise the output would not render in a browser. To get a proper text file of the output, copy/paste works better than saving to a file. And on some of the URLs, there is a mysterious space added at the end, before the double-quote, but that was fixed easily in a text editor using find/replace.

If anyone can gussy this up a little better, feel free to do so!

Source Post

Category:Templates Category:Exporting

Categories: