在《定制Sharepoint 2010表单页面(DispForm.aspx)》中解决了在定制过程中遇到的错误。在定制中使用SPD写RenderingTemplate,但是在页面自定义后发现,显示框上面始终有这么一块东西,不符合国人的习惯,干掉它!隐藏dispform.aspx页面的toolbar!

继续定制Sharepoint 2010表单页面(DispForm.aspx)

在dispform页面中,第一行代码是:

<%@ Page language="C#" MasterPageFile="~masterurl/default.master"    Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:prog,
  allowMaximize: true,
  showClose: true,
  width: 1020,
  dialogReturnValueCallback: silentCallback
};
function open(id) {options.url=id;
SP.UI.ModalDialog.showModalDialog(options);
}
function silentCallback(dialogResult, returnValue) {
}
function refreshCallback(dialogResult, returnValue) {
SP.UI.Notify.addNotification(&apos;Operation Successful!&apos;);
SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);
}
</script>

标题的链接就要写成<a href="javascript:open('/Lists/1/IndexDispForm.aspx?ID={@ID}')" title="{$DisplayTitle}" target="_self">

保存签入后点击公告标题,看最终效果。

继续定制Sharepoint 2010表单页面(DispForm.aspx)

相关文章: