Sharepoint、ajax 和页面标题 [英] Sharepoint, ajax and page title
问题描述
我在共享点和 ajax 功能方面遇到了奇怪的问题.我们在 webpart 中放置了一个 UpdatePanel.当发生部分回发时,页面标题会丢失.
I have strange problem with sharepoint and ajax functionality. We have an UpdatePanel placed inside webpart. When partial postback occurs, page title gets missing.
我们发现暂时的部分解决方案是将标题元素写成一行,并且在其中不使用任何空格或控件......甚至不是文字控件.
We have found that temporary partial solution is to write title element into one line and not use any spaces or controls inside it..not even a literal control.
但是我们需要一些方法来为所有页面提供 sommon 标题,所以标题看起来像这样:我的默认标题 - 当前页面标题
But we need some way to provide sommon title for all pages, so title would look like this: My default title - Current page title
任何想法如何解决这个问题?
Any ideas how to solve this?
推荐答案
我没有对新闻组帖子的引用,但正如 drax 提到的,这是发布页面的一个已知问题.我过去使用的解决方法是对页面上的标题进行硬编码 - 丢失的元数据标题是错误的一部分.
I don't have a reference to the newsgroup post, but this is a known problem with publishing pages, as drax mentioned. The workaround I have used in the past is to hard code the title on the page - the metadata title being lost is part of the bug.
当无法进行硬编码时,我使用 javascript 来更改页面标题:document.title = "title fixup here";
When hardcoding wasn't possible, I have used javascript to change the page title: document.title = "title fixup here";
据说微软计划在下一个 sharepoint 版本中解决这个问题.
Supposedly microsoft plans to fix this problem in the next sharepoint release.
这篇关于Sharepoint、ajax 和页面标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!