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

As Designed xen:contentcheck missing from two templates

Discussion in 'Resolved Bug Reports' started by Luxus, Jan 15, 2014.

  1. Luxus

    Luxus Well-Known Member

    The templates in question are account_following and account_ignored. I have copy&pasted part of the templates and the red part is the part that's missing:

    account_following:
    Code:
    <xen:hook name="account_following_memberlist">
    	<xen:if hascontent="true">
    		<ul class="FollowList memberList">
    			<xen:contentcheck>
    				<xen:foreach loop="$following" value="$user">
    					<xen:include template="member_list_item_follower" />
    				</xen:foreach>
    			</xen:contentcheck>
    		</ul>
    	</xen:if>
    </xen:hook>
    account_ignored:
    Code:
    <xen:hook name="account_ignored_memberlist">
    	<xen:if hascontent="true">
    		<ul class="FollowList memberList">
    			<xen:contentcheck>
    				<xen:foreach loop="$ignored" value="$user">
    					<xen:include template="member_list_item_ignored" />
    				</xen:foreach>
    			</xen:contentcheck>
    		</ul>
    	</xen:if>
    </xen:hook>
    Contentchecking the above parts in the templates is important because if you don't contentcheck them and you don't have any followers or ignored users, then the following empty html is produced regardless:

    Code:
    <ul class="FollowList memberList" ></ul>
    Why is this a problem? Because if you have, for example, applied a border to this element, you would see this:

    border.png
     
  2. Mike

    Mike XenForo Developer Staff Member

    In this case, the list has to stay - .FollowList is applied to it as it's a JS target. If you had an empty list, you wouldn't be able to (visually) add people to it if it were content check'd.
     

Share This Page