Changing the length of the Basename in Movable Type's settings will change the Basename length for new entries. The Basename for existing entries will not change.
I tried using Brad Choate's EntrySetBasename plugin (which was written for MT4.x) to change the Basename for all existing entries, but the plugin would not install without an error in the Movable Type 5 admin interface - and MT would not work with the plugin installed.
I wanted all blog entries to have up to the maximum of 250 characters for the Basename length, and I was willing to delete, if necessary, all entries (about 775) and import them with new Basenames. So, these are the steps I took (I am not responsible for any problems you may encounter. Backup all files first.):
- Export all blog entries to a backup file (important in case you mess up)
- Back up the source blog to a backup file (same reason)
- Create an index template in the format used for MT entry export files
-
Change the Basename field in the template to the EntryTItle but with hyphens removed and dirify-ed with spaces changed to underscores
-
change:
BASENAME:<$MTEntryBasename$> -
to:
BASENAME: <$mt:EntryTitle regex_replace="/-/g","" dirify="_" trim_to="250"$>
-
change:
- Set an Output File for the template
- Publish the template to generate the output file (which is an export file of all entries with a maximum 250-character Basename)
- Copy the output file into the mt/import/ directory
- Delete all entries from the blog
- Import the output file that is now in the mt/import directory
- After the import finished, remove the output file from the mt/import directory (important so you don't import the entries again by mistake)
- Check to make sure entries with long EntryTitles also have long Basenames - and they do!
The export template format I used is below.










Recent Comments