Tag: blog software

Use php to display a list of Moveable Type articles on any webpage.

I liked the page design of my php-based home page, and didn’t want to roll it into Moveable type. But I wanted a list of articles to appear, and update automatically as I add entries. Taking a cue from this tip on the Moveable Type support forum:
Show related content from a blog on another’s page“,
in my blog, I created a New Archive Template on the template screen named “Category Links” with this in it:


<link rel="stylesheet" href="MT2blog/styles.css" type="text/css" />
<div class="categoryLinks">
<MTArchiveList archive_type="Category">
<$MTArchiveTitle$><br />
<MTEntries>
<a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a><br />
</MTEntries>
</MTArchiveList>
</div>

In the Weblog Config under Archiving, I checked Category and selected Category Archive (this lists all the entries by category).
In the Archive Filename line next to this new line, I added:

 

 


allcategory_links.html

This will be the name of the file generated by this archiving method – “allcategory_links.html”.
On my home page, I added this “include” to pick up that generated page:


<?$filename="/home/server/path/to/my/MTarchives/folder/allcategory_links.html";
if (file_exists($filename)) { include($filename);}?>

Or download code here

Continue reading