How do I add a new User Link under site avatar dropdown menu?

Hi,

I am trying to add a new link and page under the avatar dropdown on the top righthand side, but I'm not sure how to do so.

I noticed you can enable/disable these user links in the configuration of the site banner, but I'm not sure how to edit their content pages or add new ones.

Guidance on where to do this and how much effort it would take are greatly appreciated! Note: I'm a functional consumer, so this will require custom code, that'd be great to point out.

Parents
  • Emily,

    This is a customization of the Site - Banner widget. If you want the functionality to behave in the same manner and style as the currently allowable options then you have to update 3 parts of that widget.

    1. Configuration (Here, I've added a link called CustomA1)

    	<property id="links" resourceName="Links" descriptionResourceName="Links_Description" dataType="custom" defaultValue="Link=Notifications&Link=Inbox&Link=Bookmarks&Link=User&Link=Invite&Link=UserInformation&Link=Settings&Link=SignOut" controlType="Telligent.Evolution.Controls.SortableListControl, Telligent.Evolution.Platform" height="275" key="Link" >
    		<propertyValue value="Notifications" resourceName="Links_Notifications" />
    		<propertyValue value="Inbox" resourceName="Links_Inbox" />
    		<propertyValue value="Bookmarks" resourceName="Links_Bookmarks" />
    		<propertyValue value="User" resourceName="Links_User" />
    		<propertyValue value="Invite" resourceName="Links_User_Invite" />
    		<propertyValue value="Settings" resourceName="Links_User_Settings" />
    		<propertyValue value="UserInformation" resourceName="Links_User_Profile" />
    		<propertyValue value="SignOut" resourceName="Links_User_Logout" />
    		<propertyValue value="CustomA1" resourceName="CustomA1" />
    	</property>


    2. Resources (You'll want to add a custom resource matching the name you configured in Step #1 above)



    3. Content (You'll want to add a section to check if the link is enabled and, if so, show the custom link). In this case, I added the final #elseif

    #if($link == 'UserInformation')
    	#set($url = false)
    	#set($url = $user.ProfileUrl)
    	#if ($url)
    		<li class="navigation-list-item">
    			<a href="$core_v2_encoding.HtmlAttributeEncode($user.ProfileUrl)" data-userhover="ignore">$core_v2_language.GetResource('Links_User_Profile')</a>
    		</li>
    		#set($hasUserLinks = true)
    	#end
    #elseif($link == 'Settings')
    	#set($url = false)
    	#set($url = $core_v2_urls.Settings())
    	#if ($url)
    		<li class="navigation-list-item">
    			<a href="$core_v2_encoding.HtmlAttributeEncode($url)">$core_v2_language.GetResource('Links_User_Settings')</a>
    		</li>
    		#set($hasUserLinks = true)
    	#end
    #elseif($link == 'Invite')
    	#set($url = false)
    	#set($url = $core_v2_urls.Invite())
    	#if ($url)
    		<li class="navigation-list-item">
    			<a href="$core_v2_encoding.HtmlAttributeEncode($url)">$core_v2_language.GetResource('Links_User_Invite')</a>
    		</li>
    		#set($hasUserLinks = true)
    	#end
    #elseif($link == 'SignOut')
    	#set($url = false)
    	#set($url = $core_v2_urls.LogOut())
    	#if ($url)
    		<li class="navigation-list-item logout">
    			<a href="$core_v2_encoding.HtmlAttributeEncode($url)" class="internal-link logout">
    				#if($isImpersonated)$core_v2_language.GetResource('StopImpersonating')#else$core_v2_language.GetResource('Links_User_Logout')#end
    			</a>
    		</li>
    		#set($hasUserLinks = true)
    	#end
    #elseif($link == 'CustomA1')
    	#set($url = false)
    	#set($url = "http://www.google.com")
    	#if ($url)
    		<li class="navigation-list-item">
    			<a href="$core_v2_encoding.HtmlAttributeEncode($url)">$core_v2_language.GetResource('CustomA1')</a>
    		</li>
    		#set($hasUserLinks = true)
    	#end
    #end


    With all of those changes then you should arrive at something like the following after you've enabled the link.



    Just to add. Obviously, you can rearrange the link to your intended position at the top. I missed that step above which is why my link appears at the bottom.

  • Hi Michael, thanks for the step-by-step instruction. I'll get someone to help me implement it and will comment if there's any further clarification needed.

Reply Children
No Data