Movable Type Documentation > Appendices > Appendix: Template Tag Modifiers

count_words

Type: modifier

Returns the number of words to be output by a template tag, instead of the content.

Examples

Return the number of words in the tag <$mt:BlogDescription$>

<$mt:BlogDescription count_words="1"$>

Return the number of words in the last three entry titles combined

<MTEntries lastn="3" count_words="1">
    <$mt:EntryTitle$>
</MTEntries>
This page was last updated on 2008-04-21, 13:58.  

Submit a User Contributed Note

User contributed notes are a great way to share the knowledge you have gained in using Movable Type.

If you have a technical question or problem, please visit Movable Type Support.

(If you haven't left a note here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)