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

Template conditionals help

Andy.N

Well-known member
#1
I have a variable which is an array that holds the ID of all the tests that a member passed. I'm trying to find a way to display the highest test that the member passed so I can properly display the level they have achieved.

The conditionals below are used in message_user_info template which I have been testing for a while but it seems like if a user pass quiz {11, 13, 15, etc}, it will only check that they pass the first quiz and exit the if loop. If the user passed quiz {11,13}, it should display "C++ level 3"

Code:
<xen:if hascontent="true">
<ul class="ribbon">
<xen:contentcheck>
                        <xen:if is="{xen:helper ismemberof, $user, 9} AND !{$user.qntquiz_passed.11}">
<li class="ribbonPremium">
<div class="left"></div>
<div class="right"></div>
        C++ Level 1
</li>
                    <xen:elseif is="{$user.qntquiz_passed.11}" />
<li class="ribbonPremium">
<div class="left"></div>
<div class="right"></div>
        C++ Level 2
</li>
<xen:elseif is="{$user.qntquiz_passed.13}" />
<li class="ribbonPremium">
<div class="left"></div>
<div class="right"></div>
        C++ Level 3
</li>
                        <xen:elseif is="{$user.qntquiz_passed.15}" />
<li class="ribbonPremium">
<div class="left"></div>
<div class="right"></div>
        C++ Level 4
</li>
                        <xen:elseif is="{$user.qntquiz_passed.16}" />
<li class="ribbonPremium">
<div class="left"></div>
<div class="right"></div>
        C++ Level 5
</li>
                        <xen:elseif is="{$user.qntquiz_passed.17}" />
<li class="ribbonPremium">
<div class="left"></div>
<div class="right"></div>
        C++ Level 6
</li>
</xen:if>
</xen:contentcheck>
</ul>
</xen:if>
 

Brogan

XenForo moderator
Staff member
#4
Will do.

I just wanted to make both issues weren't worked on separately.

I'll try and have a look later - just got in from my 10k run so need some carbs...
 

Andy.N

Well-known member
#5
Will do.

I just wanted to make both issues weren't worked on separately.

I'll try and have a look later - just got in from my 10k run so need some carbs...
Sure thing Mr. Marathon man and Moderator.
If you need an admin account to take a closer look, would be happy to supply via PC.
 

Andy.N

Well-known member
#6
With the help of Jake Bunce (who else ;) ), we discover some disparity in the data that this variable collects. We will update when this is resolved.
Thank you.