Lists in MoveableType
May 2, 2004 4:29 PM   Subscribe

MTFilter: I want to track several lists of items (movies to be watched, books to be read, music listened to) as side-bar items on my MoveableType site. I suspect I can do this by creating blogs for each type of item but I'm a bit lost as to the details. Pointers?
posted by daver to Computers & Internet (11 answers total)
 
Categories are no help? MT will autogenerate concatenations of category entries, too, which I hate for way I use it to manage content but which seems fine for lists.
posted by caitlinb at 4:38 PM on May 2, 2004


MT Include is your friend.
posted by ajr at 4:44 PM on May 2, 2004


Yes - if you don't use categories on your main blog entries already then this is the easies way to go.

Use the category="category name'' and lastn="N" attributes of the MTEntries tag to list the last N posts of a particular category in different places in your weblog.

This way you'd have a "main" category for your main weblog posts, and a category each for movies, books, music.
posted by nthdegx at 4:59 PM on May 2, 2004


That said, it's not the most elegant solution, and it's not future proof should you want to use categories "properly" in the future. If it is easy for you to set up separate weblogs, doing so, and using includes, is the better route - but it's more hassle.
posted by nthdegx at 5:04 PM on May 2, 2004


If you are using PHP for your templates, using PHP's require_once method (server side include) is an easy way to go. This avoids MT's requirements to rebuild all pages that include the sidebar every time you update the sidebar content.
posted by tomharpel at 5:39 PM on May 2, 2004


Response by poster: So how do I MTInclude 10 entries from a seperate blog?
posted by daver at 9:52 PM on May 2, 2004


In the seperate blog, create a new, blank index template. In that template, include only the markup needed for the rendering of the 10 blog entires (skip the <html> and <body> tags), e.g.:

<h2>Last Ten Things on Other Blog</h2>
<ul>
<MTEntries lastn="10">
<li><a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a></li>
</MTEntries>
</ul>

Set the output file to something like "otherblog.include" or whatever name you find intuitive. Save and rebuild the new template.

Next, edit the template from the original blog in which you want to include the sidebar. Find the spot where the sidebar should be displayed, and add the following code:

<?php require_once="/otherblog.include"?>

Save the template, rebuild it and (knock on wood) it should all work.
posted by tomharpel at 10:36 PM on May 2, 2004


And now with all of that out of the way, let me be the first to point out that the preceding comment has nothing to do with how to MTInclude the previous 10 entries.
posted by tomharpel at 10:38 PM on May 2, 2004


Do you just want to cherry pick ten entries from another blog that will remain static, or do you want something more dynamic like tomharpel suggested? MT Include with template modules can help with the former, but I don't know about the latter.

Regardless, if you want static, create a template module named Movies with links to the selected ten entries. Then all you need to do is include the following wherever you would like the list to be displayed:

< $mtinclude module="Movies" $>
posted by ajr at 5:26 AM on May 3, 2004


I'll second tomharpel's suggestion (it's how I manage my sideblog), but I'll also mention that you could use "server side include", which are basically the same idea but are not run through the PHP processor.

With either SSIs or PHP includes, you'll need to change the dot-extension of your files to .shtml / .php respectively, or you'll need to edit your .htaccess file to force plain .html files to be interpreted as .shtml / .php files (you may need to add handlers for those dot-extension anyhow, depending on how the server is configured).

Also, fwiw, this is the kind of question that has been asked and answered many times on the MT support forum, which is quite good.
posted by adamrice at 6:19 AM on May 3, 2004


I do this for my blog's links section and blog roll. Its pretty easy to do with the MTOtherBlog plugin. I've written up a short description (self link) of how to do it.
posted by mmascolino at 6:39 AM on May 3, 2004


« Older Filtering the Google   |   I'm trying to troubleshoot a friend's toshiba... Newer »
This thread is closed to new comments.