2010-04-01 46 views
0

伙计们,我面临一个相当奇怪的问题。在我的Sharepoint博客中,当我点击类别过滤器页面时,我无法查看超过10个帖子。Sharepoint博客分类视图 - 分页问题

该页面只显示最新的10个帖子,当我点击下一个10的分页时,它只是说“这个类别没有帖子。”我试过在线搜索和some one had a solution to it too,但这是与查询字符串(URL)过滤器是不可用在MOSS2007标准版...

我该如何解决这个问题?任何帮助将不胜感激...

回答

0

我发现在网络上的Sharepoint博客分类分页问题的解决方案......它适用于我。 Thanks to this blog

您需要做的就是复制粘贴以下脚本。转到博客/ category/Category.aspx并添加一个Content Editior Web部件。然后转到源代码编辑器并复制粘贴以下代码。

您还可以确保隐藏Web部件,以便通过勾选布局选项下的隐藏来使其不可见/烦人。

<script language ="javascript" type = "text/javascript" > 
function changeLink(){ 
JSRequest.EnsureSetup(); 
var Category = JSRequest.QueryString["Name"]; 
var parent; 
var child; 
for (var counter =0; counter < 100; counter++){ 
var elementId = 'bottomPagingCellWPQ'+ counter; 
if (document.getElementById(elementId)){ 
parent = document.getElementById(elementId); 
child = parent.childNodes[0].childNodes[0].childNodes[0]; 
if (child.childNodes.length > 0){ 
for (var y = 0; y < child.childNodes.length; y++){ 
if(child.childNodes[y].childNodes){ 
if(child.childNodes[y].childNodes[0].tagName){ 
theAnchorTag = child.childNodes[y].childNodes[0]; 
for(var x = 0; x < theAnchorTag.attributes.length; x++){ 
if(theAnchorTag.attributes[x].nodeName.toLowerCase() == 'onclick'){ 
var str = theAnchorTag.attributes[x].nodeValue; 
str = str.replace('?', '?Name=' + Category + '\\u0026'); 
theAnchorTag.attributes[x].nodeValue = str; 
onclk = theAnchorTag.attributes[x].nodeValue; 
theAnchorTag.onclick = new Function(onclk); 
} 
} 
} 
} 
} 
} 
break; 
} 
} 
} 
addLoadEvent(changeLink); 
function addLoadEvent(func) { 
var oldonload = window.onload; 
if (typeof window.onload != 'function') { 
window.onload = func; 
} 
else{ 
window.onload = function(){ 
if (oldonload) {oldonload();} 
func();} 
} 
} 
</script>