MTCustomFields Example

Here are a couple of examples of using the MTCustomFields tags to loop through fields and display their name and value (if a value has been entered!)

<MTEntries>
    <h2><MTEntryTitle></h2>
    <MTEntryCustomFields>
        <p>
            <MTIfNonEmpty tag="EntryCustomFieldValue">
                <MTEntryCustomFieldName>: <MTEntryCustomFieldValue>
            </MTIfNonEmpty>
        </p>
    </MTEntryCustomFields>
</MTEntries>

<MTCategories>
    <h2><MTCategorylabel></h2>
    <MTCategoryCustomFields>
        <p>
            <MTIfNonEmpty tag="CategoryCustomFieldValue">
                <MTCategoryCustomFieldName>: <MTCategoryCustomFieldValue>
            </MTIfNonEmpty>
        </p>
    </MTCategoryCustomFields>
</MTCategories>

Leave a comment

Preview

About

This is part of the official user manual for CustomFields, a plugin for Movable Type by Arvind Satyanarayan.

More Information »

Screenshots

Click a screenshot to browse through the gallery or the arrows to flip through them

←→

Powered by Movable Type 4.0