Link to User Profile

I am trying to find an easy way to link a user profile to their name in the Generic Widget. The @ sign does not work in the editor in the generic widget. Why I don't know. Seems to work in THREAD and BLOG. The only way I have found so far is to use the URL to the users profile page and do a LINK highlighting their name. The downside to this is if the user changes their username, then the link is invalid. Is there a better way to do this?
  • Do you want to display the Accessing user's information?  Meaning it will be dynamically rendered depending on who is visiting the site?

  • In reply to Luke D:

    Hi Luke,

    Idea is to have the Officers of a TOPIC.  Then when a member mouses over the name,  the pop down happens and then the user can click and go to the Leaders myprofile page.  The URL link works,  but I am concerned with it staying current.

  • In reply to ViperVA:

    If you are not opposed to creating a custom widget and some could....

    1. Create a role in the membership area for each topic that will have officers, and add your officers to these roles.
    2. Create a new widget that lets you type in a role name (and any other fields you want like HTML control for a description)
    3. Look up the users in the role and use the api to display links to their profiles...

    The below code was written off the top of my head and is not tested and does not implement proper error checking, etc... but could get you started with a possible solution.

    #set($roles = $core_v2_role.Find($core_v2_widget.GetStringValue('roleName','')))
    #set($role = $roles.get_item(0))
    #set($roleUsers= $core_v2_user.List("%{RoleId = #role.Id}"))
    #foreach($user in $roleUsers)
       <li><a href='$user.ProfileUrl'>$user.DisplayName</a>