MovableBlog: no_generate attribute

Nuance 2.0

June 19, 2002

Ben reveals another undocumented feature: no_generate attribute for <MTEntryExcerpt$>.

This is useful for when you want to have an excerpt of your choosing but, when you don't write one in yourself, nothing shows up. Or, you could test to see if there is an excerpt using PHP, and print a message like "No Excerpt." if there's no excerpt.

<MTEntries lastn="1">
<?php

$excerpt = "<$MTEntryExcerpt no_generate="1"$>";
if ($excerpt)
{
print $excerpt;
}
else
{
print "No Excerpt.";
}

?>
</MTEntries>

Posted by Richard at 1:06