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

Strange template syntax error...

Discussion in 'XenForo Development Discussions' started by Liam W, Aug 18, 2014.

  1. Liam W

    Liam W Well-Known Member

    I'm working on a custom addon for someone, but I'm getting a syntax error when trying to save this template, on line 29 (the closing </xen:foreach> tag):

    <xen:title>{xen:phrase liam_banList_banList}</xen:title>
        <xen:breadcrumb href="{xen:link full:members}">{xen:phrase members}</xen:breadcrumb>
    <xen:require css="member_view.css" />
    <div class="tempBanList">
        <table class="dataTable" style="table-layout: fixed">
            <tr class="dataRow">
                <th class="bannedUser">{xen:phrase liam_banList_bannedUser}</th>
                <xen:if is="{$visitor.is_staff}"><th class="banningUser">{xen:phrase liam_banList_banningUser}</th></xen:if>
                <th class="banningDate">{xen:phrase liam_banList_banningDate}</th>
                <th class="banPeriod">{xen:phrase liam_banList_banPeriod}</th>
                <th class="banTimeRem">{xen:phrase liam_banList_timeRemaining}</th>
                <th class="banReason">{xen:phrase liam_banList_banReason}</th>
            <xen:foreach loop="$tempBans" value="$tempBan">
                <tr class="dataRow">
                    <td class="bannedUser"><xen:username user="{$tempBan.user}"/></td>
                    <xen:if is="{$visitor.is_staff}"><td class="banningUser"><xen:username user="{$tempBan.banning_user}"/></td></xen:if>
                    <td class="banningDate"><xen:datetime date="{$tempBan.ban_date}"></td>
                    <td class="banPeriod">{$tempBan.periodPhrase}</td>
                    <td class="banTimeRem">{$tempBan.remainingPhrase}</td>
                    <td class="banReason">{$tempBan.user_reason}</td>
    Any ideas? It's got me stumped...

  2. Bob

    Bob Well-Known Member

    Missing closing / on the xen datatime tag..

    <xen:datetime date="{$tempBan.ban_date}">
    needs to be this....
    <xen:datetime date="{$tempBan.ban_date}" />
    Liam W likes this.
  3. Liam W

    Liam W Well-Known Member

    Ow, I hit my head a bit too hard...

    Thanks, can't believe I missed that.

    Bob likes this.

Share This Page