One thing that I’ve seen requested from time to time is the ability to rebuild empty categories. The problem is that Movable Type doesn’t make this easy to do because when you rebuild entries, the rebuild routine loops over the entry table in order to determine which categories to rebuild. If a category doesn’t have entries, it isn’t selected for the rebuild process. But that doesn’t mean that you can’t get around this limitation.
Luckily, the routine that actually does the building doesn’t care if the category is empty. By submitting the category to the routine, you can build an empty category page, for instance as a placeholder. Your code might look something like this:
require MT::Category; my $test = MT::Category->load(9); $app->publisher->_rebuild_entry_archive_type ( Blog => $blog, Category => $test, ArchiveType => 'Category', );
There is nothing magical about the number 9 in the example above – it is just the number I was using of an empty category. You would likely want to iterate over all categories, or retrieve one from the stash or something.
If you need help putting this into a callback or plugin, let me know. As a Movable Type Consultant, it is what I do, after all.