如何在共享点主页上输出站点标题
我在 sharepoint 中有一个自定义母版页,并且想要在页面的不同部分输出网站标题。目前我可以看到使用以下代码输出的站点标题:
<asp:ContentPlaceHolder id="PlaceHolderMain" runat="server" Visible="true" />
显然使用
<asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" Visible="true" />
也应该输出标题但不返回任何内容。有什么想法出了什么问题吗?
I have a custom masterpage in sharepoint and want to output the site title in a different part of the page. Currently I can see the site title which is outputted using the following code:
<asp:ContentPlaceHolder id="PlaceHolderMain" runat="server" Visible="true" />
Apparently using
<asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" Visible="true" />
Should also output the title but is returning nothing. Any ideas what is going wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您提到的代码是内容占位符,您可以在其中替换内容,您可以将注册以下标签放在页面顶部,
并放置以下代码以获取页面标题
如果您想在您可以使用以下代码执行母版页级别
除非您覆盖上面的内容占位符,否则您将自动获得网站的标题
The Code you have mentioned are the Content Place Holders where you can replace the Content, You can place the register the below tag in the top the page and
And place the below code to get the Title of the Page
If you want to do that in the master page level you can do with the below code
Unless you override the above content place holder you will get the Title of the Web Automatically
这可以通过使用
ProjectProperty
控件来完成(请参阅 http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.projectproperty.aspx)This can be done by using the
ProjectProperty
control (see http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.projectproperty.aspx)