movabletype

MovableType 5.2.6 — modify default html markup of assets added to an entry?


I know that for a long time MT has not made it easy / accessible to edit the default markup that wraps an [image] asset when it is inserted into a MT entry. (So strange that this hasn't been created as a system module like everything else.)

There is one plugin that seemed to solve this problem, though it was written for MT 4* and seems to be defunct: https://github.com/endevver/mt-plugin-custom-asset-markup I've installed it, anyway, and it's unclear how it's supposed to work or be triggered / managed (there are no settings, though I may be doing it wrong).

Every time an image is inserted into an entry, I want its markup to include a few of its properties in the tag. For example, I want to assign the ID value of each image when it's inserted into the entry body:

<IMG ID="ar_<mt:AssetId>" … />

Solution

  • I've used the Assetylene plugin to do this many times. It works just as you expect -- create a template module named "Asset Insertion" and edit the HTML to be spit out. I've tested it with MT4 and 5 -- I'm sure it works with 5.2.6 -- and it should work with MT6, too.