I'm trying to add a custom property to the Member Directory card. I created the new property, named Position, of type text, length 50. It is supposed t hold a user's position within the company.
Now, as soon as I add the following to my template the listing doesn't appear:
<li class="mdPosition"><p><span data-bind="text: PositionText"></span> </p></li>
If I understand it correctly the new properties are not automatically propagated to existing users and hence knockout template fails. Is there a way to conditionally display property if it is not null? Or is there some other workaround?
Below is the full text of my template.
Any suggestions appreciated, thanks,
Ark
<div class="mdMemberDetails" data-bind="css: {mdFriend: IsFriend(), mdFollowing: IsFollowing(), mdFollower: IsFollower() }">
<a href="" class="mdMemberImg" data-bind="attr: { title: DisplayName, href: ProfileUrl }">
<span><img data-bind="attr: { src: getProfilePicture(50,50), title: DisplayName }" /></span>
</a>
<ul class="MdMemberInfo">
<li class="mdDisplayName">
<a href="" title="" class="mdMemberTitle" data-bind="attr: { title: DisplayName, href: ProfileUrl }, event: { mouseover: $parent.showPopUp }">
<span data-bind="text: DisplayName"></span>
</a>
</li>
<li class="mdTitle"><p><span data-bind="text: FirstName"></span> <span data-bind="text: LastName"></span></p></li>
<li class="mdPosition"><p><span data-bind="text: Position"></span> </p></li>
<li class="mdLocation"><p><span data-bind="text: Location()"></span></p></li>
</ul>
<ul class="mdHoverActions" data-bind="visible: !IsUser() && IsAuthenticated">
<li class="mdFriendRequest" data-bind="visible: FriendStatus() == 0"><a href="" class="firstItem" data-bind="click: addFriend"><span data-bind="text: AddFriendText"></span></a></li>
<li class="mdFriendPending" data-bind="visible: IsPending()"><p><span class="firstItem"><span data-bind="text: FriendPendingText"></span></span></p></li>
<li class="mdFriendAccept" data-bind="visible: HasPendingRequest()"><a href="" class="firstItem" data-bind="click: acceptFriend"><span data-bind="text: AcceptFriendText"></span></a></li>
<li class="mdFriendRemove" data-bind="visible: IsFriend()"><a href="" class="firstItem" data-bind="click: removeFriend"><span data-bind="text: RemoveFriendText"></span></a></li>
<li class="mdFollow" data-bind="visible: !IsFollowing()"><a href="" title="" class="firstItem" data-bind="click: follow"><span data-bind="text: FollowText"></span></a></li>
<li class="mdUnfollow" data-bind="visible: IsFollowing()"><a href="" title="" class="firstItem" data-bind="click: unFollow"><span data-bind="text: UnFollowText"></span></a></li>
<li class="mdComposeMessage"><a href="" class="ComposeMessage"><span data-bind="text: SendMessageText"></span></a></li>
</ul>
</div>