如何在 Sharepoint 2010 Web 部件页面中正确更新站点图标
我正在努力在 SharePoint 2010 中创建可重用且可扩展的 Web 应用程序。我创建了一个母版页以应用于网站中的所有页面。但是,每当我创建 Web 部件页面并导航到它时,站点图标都不会显示。它没有显示我的自定义网站图标,而是显示默认的 SharePoint 图标。我可以通过将图标直接放入母版页来解决这个问题,但是如果我想扩展此 Web 应用程序,则需要创建一个新的母版页。
有谁知道为什么会发生这种情况?我最初的想法是,Web 部件页面已以某种方式自定义为不使用默认母版页,但情况似乎并非如此:如果我更新母版页,它会反映在 Web 部件页面中。
谷歌搜索并检查这个网站并没有得到什么答案。我只发现一篇文章报告了我正在观察的相同问题,但没有解决方案。
如果有帮助的话,我在导航到此页面时确实注意到了一个现象。在页面完全加载之前,正确的站点图标会出现一瞬间,然后被默认站点图标替换。希望有帮助。
I'm working on creating a reusable and extensible web application in SharePoint 2010. I've created a master page to apply across all pages in the site. However, whenever I create a web part page and navigate to it, the site icon does not display. Instead of my custom site icon being displayed it shows the default SharePoint icon. I can get around this by placing the icon directly into the master page, but that would require me to create a new master page if I ever wanted to extend this web application.
Does anyone know why this is happening? My initial thought was that the web part page had somehow been customized to not use the default master page, but that does not seem to be the case: if I update the master page it is reflected in the web part page.
Googling around and checking this site yielded little answers. I only found one post out there that reported the same issue I am observing but there was no solution.
If it helps, I did notice one phenomena when navigating to this page. Before the page completely loads, the correct site icon appears for a split second before being replaced with the default site icon. Hope that helps.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
今天早上我遇到了同样的问题,并且不想为此创建一个自定义母版页,但幸运的是,通过遵循 admlcrunch 的建议(在 SharePoint 2010 上),它很快得到了解决:
唯一不好的是,您必须更新每个 Web您想要显示自定义图标图像的部分页面。
I ran into the same issue this morning and didn't want to create a custom master page just for this, but luckily it was quickly resolved by following admlcrunch's suggestion (on SharePoint 2010):
The only bad thing about this is, you have to update every Web Part page that you want custom icon image to display.
我只是遇到了同样的问题。 Web 部件页有自己可以设置的图标。
要设置图标,请单击页面 > 标题栏属性。这将打开“Web 部件页面标题栏”对话框。在此对话框中有一个用于设置图像链接的区域。您可以在此处设置图标。我刚刚将 URL 复制到了站点图标。
I was just having the same issue. Web Part Pages have their own icon that you can set.
To set the icon click Page > Title Bar Properties. This will open the Web Part Page Title Bar dialog. In this dialog there is an area to set the Image Link. You can set the icon here. I just copied the URL to the site icon.
在设计器中打开页面并从以下位置删除自定义标题栏占位符:
[WebPartPages:TitleBarWebPart]
:
[asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea"]
Open the page in designer and remove the custom titlebar place holder:
[WebPartPages:TitleBarWebPart]
from the :
[asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea"]