Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Member Directory and Custom PropertiesMember Directory and Custom Properties
Previous
 
Next
New Post
8/23/2012 4:36 PM
 

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>

 
New Post
8/24/2012 10:14 AM
 

Just an update: so I populated ALL user properties with the new property but the new property still crushes the template.
Next step, examine the source code.

BTW if you are interested, below is the SQL I used to insert profile records for all users (use at your own risk):

-- Change the new property name only
declare @PropertyName nvarchar(50) = 'Position'

-- Don't change below --
declare @PropertyDefinitionID int

select @PropertyDefinitionID = ppd.PropertyDefinitionID
from ProfilePropertyDefinition ppd
where ppd.PropertyName = @PropertyName

insert into UserProfile(UserID, PropertyDefinitionID, PropertyValue, PropertyText, Visibility, LastUpdatedDate, ExtendedVisibility)
select distinct u.UserID, @PropertyDefinitionID,'',null, 0, getdate(), ''
from Users u
where u.UserID not in (select distinct up.UserID
       from UserProfile up
       where up.PropertyDefinitionID = @PropertyDefinitionID)

 

 
New Post
9/13/2012 4:10 PM
 

Hi Alex,

I' m having the same issues you are with custom profile properties and the Member Directory.  I've looked at the source code as well and it looks like the C#/VB should be passing all profile properties through but I think the javascript/knockout is falling flat.

If you get it working, please post back the fix...

 
New Post
11/21/2012 12:27 AM
 
anything solutions yet?

I'm trying to work this out on 6.2.4
 
New Post
11/22/2012 7:47 AM
 
I'm still back on 6.2.3 and haven't moved ahead yet. I'm understanding knockout a little better so may go back and give it a go...
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Member Directory and Custom PropertiesMember Directory and Custom Properties


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out