Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Member profile path in community settings does not work as expected View modes: 
User avatar
Member
Member
Chanan - 3/26/2011 5:48:48 PM
   
Member profile path in community settings does not work as expected
Hello,

We would like to change from using username for the profile page to user id since we are using emails as the username. I changed the setting in profile page to /Members/{UserID} which works fine when I type in the path manually. When I changed the "Member profile path" in the site settings and then look at the website I see urls the look like: http://dev.surroundhealth.net/members/%7Buserid%7D.aspx - Did I do something incorrectly (or do I get a tree planted ;) )?

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 3/28/2011 12:53:34 PM
   
RE:Member profile path in community settings does not work as expected
Hi,

I tested the behavior, changed Document URL path to /Members/{UserId} on the Profile document. Then I used following code in the Community.Transformations.MembersList transformation used on the Members document to


<h3><a href="<%# HTMLEncode(GetMemberProfileUrl(Eval("UserId"))) %>" title="<%# HTMLEncode(GetNotEmpty("UserNickname;UserName")) %>"><%# HTMLEncode(GetNotEmpty("UserNickname;UserName")) %></a></h3>


In the Site Manager - Settings - Community - Member profile path has to be used path /Members/{UserName}, even you are using UserId.

Now the link will be generated correctly and the profile displayed, instead of username will be used userId.


Best regards,
Ivana Tomanickova

User avatar
Member
Member
Chanan - 3/31/2011 10:51:42 AM
   
RE:Member profile path in community settings does not work as expected
oh! ok, my mistake was in a misunderstanding of how the GetMemberProfileUrl works. I was passing it a Username, thinking that it will take the username, see the {UserId} in the path and build the correct path. But in reality, it just creates the path from what ever is passed.