我已经为SharePoint 2010创建了一个新的母版页。现在我只是想让它工作。我想显示谁修改了页面以及何时修改。这适用于此代码:
<SharePointWebControls:DateTimeField FieldName="Modified" runat="server" ControlMode="Display"/>
通过
<SharePointWebControls:UserField FieldName="Modified By" runat="server" ControlMode="Display"/>
但我的问题是当我用我的主页面加载SP页面时,这部分页面会停留0.5秒然后消失。我的问题是:你知道如何通过内容修改和修改我的网站吗?
感谢您的帮助!
答案 0 :(得分:0)
我的问题的答案是我必须在此标记之前放置问题的鳕鱼:
<asp:ContentPlaceHolder id="PlaceHolderFormDigest" runat="server">
所以我的鳕鱼看起来像这样:
<!-- Footer with Last modified/modified by and date of the day -->
<div class="s4-notdlg" style="clear:both; background-color:white; padding:10px; margin-left:160px;">
<div class="hide">
<div>
Idag är det
<script type="text/javascript">
var date = new Date();
document.write(date.toLocaleDateString());
</script>
</div>
Senast uppdaterat:
<SharePointWebControls:DateTimeField ID="DateTimeField1" FieldName="Modified" runat="server" ControlMode="Display"/> av
<SharePointWebControls:UserField ID="UserField1" FieldName="Modified By" runat="server" ControlMode="Display"/>
</div>
</div>
<SharePoint:DeveloperDashboard ID="DeveloperDashboard1" runat="server"/>
</div>