1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Creating a Callback for Custom Fields for Enumeration

Discussion in 'Styling and Customization Questions' started by CaptainMorgan, Jun 18, 2015.

  1. CaptainMorgan

    CaptainMorgan Active Member

    I realized my initial post was sorta crap. So I'm redoing it.

    How in the templates do I enumerate a list of Custom User Fields, that match a unique fieldId value, for display on a message's postbit? For example, output should like so:

    1. Mechanic
    2. Plumber
    3. Carpenter

    My message_user_info code:
                                <dl class="pairsJustified userField_{$fieldId}">
                                    <dt><xen:if is="{$fieldId} == 'jobs'">
                                        <span class="job_title">{xen:helper userFieldTitle, $fieldId}</span>:</dt>
                                    <dd><xen:contentcheck>{xen:helper userFieldValue, $fieldInfo, $user, {$user.customFields.{$fieldId}}}</xen:contentcheck></dd>
    The foreach for this section is:
                    <xen:foreach loop="$userFieldsInfo" key="$fieldId" i="$i" count="$count" value="$fieldInfo">
    Thank you!
    Last edited: Jun 18, 2015

Share This Page