No, there isn't a way to do that in the template language. For various technical reasons it isn't possible (requires deferred evaluation).
You can of course do this in a custom template function (Preferences / Template Functions) where you have full python available. You can call standard template functions in a custom function, but it is enough of a pain that you might be better off doing your own shorten.
|