带有标准工具栏的XSLTListViewWebpart不显示“添加新" [英] XSLTListViewWebpart with Standard Toolbar does not show Add New
问题描述
大家好,
我对XsltListViewWebPart有问题.
I have a problem regarding XsltListViewWebPart.
我在发布页面上添加了一个,并使用CSOM和Javascript设置了所有默认值.当我浏览该页面时,我意识到显示了视图,但是添加新"却显示了该视图.按钮丢失.我也意识到这是我做手术时的行为 手动.
I added one to a publishing page and let all the defaults using CSOM and Javascript. When I browse the page I realize that the view is displayed but the "Add New" button is missing. I also realized that this is the behavior when I do the operation manually.
我检出了该模式,并意识到该工具栏被标记为标准",该标准应该显示新项".按钮,但没有.
I checked out the Schema and realized that the ToolBar is marked as Standard which is supposed to show the "New Item" button but doesn't.
另一方面,当我将具有相同默认值的相同Web部件添加到非发布页面时,新项目"按钮出现并正常工作.
On the other hand, when I add the same webpart with the same default values to a non publishing page, the "New Item" button appears and works properly.
您知道吗?
- 为什么在相同的XsltListViewWebPart的发布/非发布页面中会出现这种不同的行为?
- 我该如何做到这一点,以便我的Web部件显示添加新内容"?使用CSOM和Javascript将其添加到页面时,是否可以单击按钮?
预先感谢您的帮助!
推荐答案
请尝试将工具栏类型设置为完整工具栏",然后检查是否发生此问题.
Please try to set the Toolbar Type to "Full Toolbar" and then check if this issue occurs.
或者您可以使用UI将Web部件添加到发布页面.
Or you can add a web part to the publishing page using UI.
如果问题仍然存在,请提供您的代码或屏幕截图以供进一步研究.
If the issue persists, please provide your code or screenshot for further research.
最好的问候
这篇关于带有标准工具栏的XSLTListViewWebpart不显示“添加新"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!