문제

Hi I have developed a custom welcome control for SharePoint 2013 website. I can see the Welcome control menu items as required but the Icons for each menu items are not visible. This is the code for each menu item.

<SharePoint:MenuItemTemplate runat="server" id="Change_custom_Password" Text="Change Password" Description="Change my password." ImageUrl="/images/changepassword.png" OnLoad="MenuItemTemplate_OnLoad" MenuGroupId="150" UseShortId="true" Sequence="110" />

This code works fine in Sharepoint 2010 and displays the images next to the menu item but the ImageUrl property is not working in SP2013.

SP2013 looks like this:

SP2013 looks like

and SP2010 looks like this:

SP2010 looks like

Can anyone suggest how can I get this working in 2013?

Thank you!

도움이 되었습니까?

해결책

I got this thing working through CSS in master page by using the ID of the menu item as follows:

div[id$="Change_custom_Password"]{
background-image:url('/SiteAssets/images/Change_custom_Password.png');
background-repeat: no-repeat;
background-position: left ;  
width:100%;
height:32px;
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top