Wednesday, June 5, 2013

check Publishing page status

if you want to check current status in publishing page is Display mode :
[Code]

<%if (Microsoft.SharePoint.SPContext.Current.FormContext.FormMode == SPControlMode.Display)  {  %>    <asp:HyperLink runat="server" Text="<%$ Resources: SECITN.ListdefinitionStrings, backToNewsBtn %>" NavigateUrl="javascript:void(0);" OnClick="if($('.breadcrumbNode').length == 1){ $(this).attr('href','../forms/allnews.aspx?RootFolder=/' +$('.breadcrumbNode').attr('href').split('/')[1]+ '/Pages/News')}else{$(this).attr('href','../forms/allnews.aspx?RootFolder=/Pages/News')}"/>  <%}%>

No comments:

Post a Comment