Learn More





DNN Community Blog

The Community Blog is a personal opinion of community members and by no means the official standpoint of DNN Corp or DNN Platform. This is a place to express personal thoughts about DNNPlatform, the community and its ecosystem. Do you have useful information that you would like to share with the DNN Community in a featured article or blog? If so, please contact .

The use of the Community Blog is covered by our Community Blog Guidelines - please read before commenting or posting.

Adding a website link to the Member Profile and Directory in DotNetNuke 6.2

See the original post with code at

In case you missed it, DotNetNuke 6.2 was released today, check out Will Morgenweck’s blog post for more details on the release.

With some of the new features DotNetNuke 6.2 makes it easier to start to customize the listing of members on your site, and also the Profile display for users on the website. I started implementing DotNetNuke 6.2 on one of my racing websites last night (yeah, so I upgraded before the release happened, a benefit of working for the corp).

In doing so I configured the profile pages on the website to use some of the new 6.2 functionality, before I show you the code, here’s a link to my profile over there, so you can see what all I implemented. This is far from complete, plenty of more work to be done, but it provides far more information than the profiles did two days ago.

Now for the code itself. This code gets included in the ViewProfile module as the profile template, this was what I put in last night.

<div class="pBio">
    <h3 data-bind="text: AboutMeText"></h3>
    <p data-bind="html: Biography"></p>
<div class="pAddress">
    <h3 data-bind="text: LocationText"></h3>
    <p>    <span data-bind="text: Location()"></span><span 
data-bind="visible: Location().length > 0"><br/></span>
    <span data-bind="text: Country()"></span><span data-bind="visible: Country().length > 0"><br/></span>
<div class="pContact">
    <h3 data-bind="text: GetInTouchText"></h3>
        <li data-bind="visible: Website().length > 0"><strong><span 
data-bind="text: WebsiteText">:</strong> <span data-bind="text: Website()"></li>
<div class="dnnClear"></div>                  

That will show some basic information for a user’s profile. One thing I wanted to do was to make the Website option an actual hyperlink, as you can see in that display it isn’t right now. To do so is fairly straight forward, in place of that line, we would use the following code

<li data-bind="visible: Website().length > 0"><strong><span 
data-bind="text: WebsiteText">:</strong> <a href="" title="" class="profWebsite"
data-bind="attr: { title: Website(), href: Website() }" rel="nofollow" target="_blank">
<span data-bind="text: Website()"></span></a></li>

Basically we’re using Knockout.js to bind the Website information from the User’s Profile, to

the hyperlink, for both the href and title value, then spitting out the Website attribute as the text of the hyperlink as well. For SEO purposes I put a rel=”nofollow” in there to prevent search engines from giving the profile links any weight, you could always change that if you wish.

In addition to that information, I always wanted to enable a “send me an email” link, that pointed to the new Messaging Center in DNN 6.2. That wasn’t quite as easy as adding the Hyperlink to the Profile page, but it was pretty straightforward (to be honest I just ripped off the code from the Default “template” in DotNetNuke 6.2, but that is the beauty of open source. To add the Message link, as well as a “Friend” and “Follow” link I used the following code

<div data-bind="visible: !IsUser() && IsAuthenticated">
        <li><a href="" title="" class="ComposeMessage"><span data-bind="text: SendMessageText">
        <li><span><a href="" data-bind="click: addFriend, visible: FriendStatus() == 0"><span
            data-bind="text: AddFriendText"></span></a><span
 data-bind="click: addFriend, visible: IsPending()">
                <span data-bind="text: FriendPendingText"></span></span><a href="" 
data-bind="click: acceptFriend, visible: HasPendingRequest()">
                    <span data-bind="text: AcceptFriendText"></span></a><a href=""
 data-bind="click: removeFriend, visible: IsFriend()">
                        <span data-bind="text: RemoveFriendText"></span></a></span></li>
        <li><span><a href="" data-bind="click: follow, visible: !IsFollowing()"><span
 data-bind="text: FollowText">
        </span></a><a href="" data-bind="click: unFollow, visible: IsFollowing()"><span
 data-bind="text: UnFollowText">

But I didn’t add it to the ViewProfile module. Instead you need to place the Member Directory module on a page, set the above code as the Item and Alternate Item template.

You can see the Member Directory module in action in this “Using the Member Directory in DotNetNuke 6.2” video.


Comment Form

Only registered users may post comments.


2sic Daniel Mettler (124)
Aderson Oliveira (15)
Alec Whittington (11)
Alex Shirley (10)
Andrew Nurse (30)
Anthony Glenwright (5)
Antonio Chagoury (28)
Ash Prasad (22)
Ben Schmidt (1)
Benjamin Hermann (25)
Benoit Sarton (9)
Beth Firebaugh (12)
Bill Walker (36)
Bob Kruger (5)
Brian Dukes (2)
Brice Snow (1)
Bruce Chapman (20)
Bryan Andrews (1)
cathal connolly (55)
Charles Nurse (163)
Chris Hammond (203)
Chris Paterra (55)
Clinton Patterson (28)
Cuong Dang (21)
Daniel Bartholomew (2)
Dave Buckner (2)
David Poindexter (3)
David Rodriguez (2)
Doug Howell (11)
Erik van Ballegoij (30)
Ernst Peter Tamminga (74)
Geoff Barlow (6)
Gifford Watkins (3)
Gilles Le Pigocher (3)
Ian Robinson (7)
Israel Martinez (17)
Jan Blomquist (2)
Jan Jonas (3)
Jaspreet Bhatia (1)
Jenni Merrifield (6)
Joe Brinkman (270)
John Mitchell (1)
Jon Henning (14)
Jonathan Sheely (4)
Jordan Coopersmith (1)
Joseph Craig (2)
Kan Ma (1)
Keivan Beigi (3)
Ken Grierson (10)
Kevin Schreiner (6)
Leigh Pointer (31)
Lorraine Young (60)
Malik Khan (1)
Matthias Schlomann (15)
Mauricio Márquez (5)
Michael Doxsey (7)
Michael Tobisch (3)
Michael Washington (202)
Mike Horton (19)
Mitchel Sellers (28)
Nathan Rover (3)
Navin V Nagiah (14)
Néstor Sánchez (31)
Nik Kalyani (14)
Peter Donker (52)
Philip Beadle (135)
Philipp Becker (4)
Richard Dumas (22)
Robert J Collins (5)
Roger Selwyn (8)
Ruben Lopez (1)
Ryan Martinez (1)
Salar Golestanian (4)
Sanjay Mehrotra (9)
Scott McCulloch (1)
Scott S (11)
Scott Wilkinson (3)
Scott Willhite (97)
Sebastian Leupold (80)
Shaun Walker (237)
Shawn Mehaffie (17)
Stefan Cullmann (12)
Stefan Kamphuis (12)
Steve Fabian (31)
Timo Breumelhof (24)
Tony Henrich (3)
Torsten Weggen (2)
Vicenç Masanas (27)
Vincent Nguyen (3)
Vitaly Kozadayev (6)
Will Morgenweck (37)
Will Strohl (163)
William Severance (5)
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?