As designed xen:contentcheck missing from two templates

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:
Rich (BB 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:
Rich (BB 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.webp
 
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.
 
Top Bottom