-
10-12-2019 - |
题
我正在使用以下代码在页面布局中获取当前页面的页面标题,但它不起作用。
<asp:Literal runat="server" text="<%$SPContext.Current.Item['Title']%>"></asp:Literal>
如何在页面布局中获取页面标题?
解决方案
在客户上工作,无论如何神秘,最初是组成的html页面的标题(如果这就是你想要的):
<html>
...
The title of the document is:
<script type="text/javascript">
document.write(document.title);
</script>
...
</html>
.
请参阅: http://www.w3schools.com/jsref/prop_doc_title.asp 其他提示
你需要我们的 SharePointWebControl:TextField
或 SharePointWebControl:FieldProperty
控制。
Waldek在这里写了一篇关于它的博客: http://blog.mastykarz.nl/showing-names-site-columns-page-layout/#