MTDynamic is a Movable Type plugin that is designed to facilitate the dynamic rendering of Movable Type blogs, using URL parmaters to control the display of entries and comments.
Installation
1. Movable Type ships with a dynamic viewer (mt-view.cgi), which is described as an "experimental feature". To use to the viewer, you must turn "SafeMode" off. To do this, edit your "mt.cfg" file such that it includes the following:
SafeMode 0
There should already be a SafeMode section near the bottom of the cfg file.
2. Download and extract Dynamic.pl to your hard drive.
3. Upload Dynamic.pl to the "plugins" directory in your MT Installation.
Template Tags
MTDynamic creates two new tags, <MTDynamicEntries> and <MTDynamicComments>. These tags can be used in the same manner as MTEntries and MTComments - the tags will work in both static and dynamic views.
To use with the MT dynamic viewer, you need to use a path like:
http://www.yourdomain.com/path_to_mt/mt-view.cgi/1/index.html
where the number is the Blog ID of the blog. Index templates can be accessed using this format.
Now you can use URL paramters in the format of ?argument=value to control the entries that are displayed. Any of the MTEntries arguments can be used*. For example:
mt-view.cgi/1/index.html?lastn=10&category=Links
will display the last 10 entries posted by John.
*Note: to specify an author argument in the URL, you need to use a parameter called "entry_author". This is to avoid conflicts with the comment "author" parameter used with comment submissions.
Update (v0.6): To specify an "offset" argument in the URL, you need to use a paramter called "dyn_offset". This is to avoid conflicts with the "offset" parameter used with "rebuild files" tool.
To access individual entry pages using the dynamic viewer, use a path like:
http://www.yourdomain.com/path_to_mt/mt-view.cgi/1/entry/123
where "1" is the blog ID and "123" is the Entry ID.
MTDynamicComments includes two new arguments: start and show. I found that the "lastn" and "offset" approach can get confusing when listing comments, because usually you want to show them in ascending order. The "start" and "show" simplifies this:
start - the first comment to be displayed (chronologically)
show - the total number of comments to be displayed
Using this logic, ?start=11&show=10 will display comments 11 through 20. This can be useful for displaying blog entries with a lot of comments.
What if an argument is defined in the template AND in an URL parameter? In this case, the URL parameter value will override the value defined in the template. This enables you to create templates that can be used in both static and dynamic formats. For example, your home page might be presented in a static format, but you could provide filtered views of the home page using dynamic paths with parameters.
Examples
Using my Mars Rover Blog as an example, see that the home page contains blog entries and photos by two authors: Spirit and Opportunity. You can use MTDynamic to offer filtered views of the home page (note the path and URL parameters):
Only Spirit's blog entries and photos
Only Opportunity's blog entries and photos
This is my first plugin. I am sure there are bugs, please report any strange behaviour. Any and all comments, feedback, and suggestions are welcome.

Comments (12)
I am really excited, I think this is just what I need for my site. But am concerned about turning off SafeMode. Can you tell me more about the implications of doing this? What are the risks?
Thanks for developing this!
Posted by Ruby Sinreich | February 29, 2004 9:33 AM
Posted on February 29, 2004 09:33
This is what I could find regarding SafeMode (from the MT User Manual):
Posted by Mark Carey | February 29, 2004 9:50 AM
Posted on February 29, 2004 09:50
Someone pointed me to your page because of what appears to be the magic plugin that I need for MT. I'm wanting to have my index page show 6 entries and then at the bottom have a link to the "Next 6 Entries", which goes to of course another page witht he next 6 entries with another link at the bottom going back another 6 and so on. Will this plugin do that? If so, could you please tell me how to implement it? I'm a very slow learner :) Thank you so much already!!!!
Posted by Shane Bryant | March 27, 2004 8:45 PM
Posted on March 27, 2004 20:45
I also wrote a plugin that does some dynamic display of existing templates. The problem with this is that it's incompatible with a template that has other dynamic elements in it. For instance, if movable type would normally write out the template to a static page, and that static page would have php code in it that is intended to be dynamically processed, then the dynamic php code won't work anymore. It's pretty close to impossible to have a script that will dynamically display a perl template, and then spawn a php process to dynamically interpret the dynamically output perl code. (Sorry if that sentence is hard to read... it's hard to write, too!) :roll:
Posted by tunesmith | March 28, 2004 3:51 AM
Posted on March 28, 2004 03:51
Shane,
This plugin does do that, but I have some enhancements planned in this area. Scroll to the botton of this page and you will see this in action. The "pages" links at the bottom take the visiotr to the next page. That said, those links are static, they is no intellegence to to them - I just decided to show 10 pages and created 10 links. In a future version of this plugin, I plan add an automated "pages" function that will determine the number of pages and create the correct number of page links.
(You may also want to try a plugin called MT Paginate - I haven't tried it myself, but it may meet your needs)
Posted by Mark Carey | March 28, 2004 8:51 AM
Posted on March 28, 2004 08:51
Hey this is great, I've got it up and running on my site now.
Posted by Gordon King | April 5, 2004 7:00 AM
Posted on April 5, 2004 07:00
is it possible to use MTDynamic to generate dynamic chunks of Atom XML?
I'm not up to speed on Perl and get aggitated every time I poke around the source for movable type ;)
thanks
Posted by chris davis | December 6, 2005 2:29 AM
Posted on December 6, 2005 02:29
Sure, you can use MTDynamic tags in any type of MT template, whether HTML or XML.
Posted by Mark Carey | December 6, 2005 11:31 AM
Posted on December 6, 2005 11:31
Hi Mark -
A client of mine uses MTDynamic with an MT 3.2 installation (perhaps not the best setup :), and I found that it is including comments that have been junked. To get around this, I added some code to account for comments that are visible only. You may (or may not) care to address this in your plugin, just wanted to let you know.
Posted by Chad Everett | April 5, 2006 8:18 AM
Posted on April 5, 2006 08:18
Thanks for the note, Chad.
I know that I did update the plugin after upgrading the plugin, as I noticed the same thing. I guessed I never released the update. I suppose I should do that... ;)
Posted by Mark Carey
|
April 5, 2006 10:48 AM
Posted on April 5, 2006 10:48
A team of successful entrepreneurs credited for www.SelectWealthSystem.com
A new home-based-business marketing system that provides the strategic high ground for internet marketing.
Pro Team Marketing uses an automated marketing system that is currently promoting a cutting-edge young company, entering the early growth stage, that targets the largest consumer base in the United States with their financial educational products.
http://www.SelectWealthSystem.com
Posted by jayram | April 3, 2008 6:52 AM
Posted on April 3, 2008 06:52
Thanks for giving such a very good information.. Still now I didn't came across this one.. This one seems to be nice one.. Is this one is the latest version or anyother else beaten this one..
=====
bilal
Social Media Marketing - 36556634.4210489 http://www.widecircles.com
Posted by bilal | June 30, 2008 8:31 PM
Posted on June 30, 2008 20:31