Quick tip: Expression Engine Movable Type Export

Feature image

Another day, another EE tidbit. I wanted to export the entries from my blog in a simple text backup (MT Export Format). In the Expression Engine support wiki, there is an entry on how to do this in the 1.6.8 version, but I’m using 2.0.1 public beta. I had to do a few modifications to make it work in the new version. I posted my code on the Wiki, but if you ended up here looking for export tips, here’s how I did it.

First, as the wiki page says, make a new template group called ‘export’. The ‘index’ file in that new template group should contain the following code. Be sure to update the “default site” to whatever your channel is called.

{exp:channel:entries channel="default_site" limit="999" rdf="off"} 
AUTHOR: {author}
TITLE: {title}
STATUS: Publish
ALLOW COMMENTS: 2
CONVERT BREAKS: br
{categories}CATEGORY: {category_name}
{/categories}
DATE: {entry_date format='%m/%d/%Y %h:%i:%s %A'}
-----
BODY:
{body}
-----
EXTENDED BODY:
{extended}
-----
{embed="export/comments" the_entry_id="{entry_id}"}
--------
{/exp:channel:entries}


Make a ‘comments’ template within the same ‘export’ template group. I used the following in the ‘comments’ template, but I did not enable PHP in the template since there is no PHP in the updated code as the original wiki article says to do.

{exp:comment:entries channel="default_site" entry_id="{embed:the_entry_id}" sort="asc"}COMMENT: 
AUTHOR: {name} 
URL: {url} 
DATE: {comment_date format="%m/%d/%Y %h:%i:%s %A"} 
{comment} 
----- 
{/exp:comment:entries}

Now go view the index template by clicking the ‘view’ link in the control panel next to the ‘index’ template. It will generate a possibly very long ugly page. View source on that page and save the source. That’s your posts plus your comments in MT Export Format.

Comments on this post.

That’s awesome advice. Thank you, this is exactly what I need for my blog.

By Bill Tandy on Oct 10 2011

Leave Your Comment:

name:

email:

location:

url:

your comment:

Remember my personal information

Notify me of follow-up comments?

Twitter Feed

John Morton talking on Twitter




Meanwhile on Instagram… //

My latest shot from Instagram.