При создании списка «Доска обсуждений» мы получаем
представление AllItems.aspx которое не доступно для редактирования. Если присмотрится
внимательно, то можно заметить, что переключение между отображением информации происходит
через JS .
Немного углубившись я заметил следующее:
Изменение отображения происходит при вызове функции
SP.UI.Discussions.SortFilterItem.onPivotControlMenuOptionClick('SortItem1')
При изменении параметра меняется отображение данных.Использование SortItem1
равносильно нажатию на «Последние»
Ниже приведу таблицу с параметрами.
как можно использовать:
добавить на страницу редактор скрипта и в него положить
или другим способом, более удобным.
как можно использовать:
добавить на страницу редактор скрипта и в него положить
Последние
Параметр
|
Название
|
CAML
(если есть)
|
SortItem1
|
Последние
|
|
SortItem2
|
Вопросы
без ответов
|
"<View><ViewFields><FieldRef Name="ID"/><FieldRef Name="PermMask"/><FieldRef Name="Created"/><FieldRef Name="Modified"/><FieldRef Name="Title"/><FieldRef Name="FSObjType"/><FieldRef Name="ContentTypeId"/><FieldRef Name="FileRef"/><FieldRef Name="LinkDiscussionTitle"/><FieldRef Name="Author"/><FieldRef Name="ItemChildCount"/><FieldRef Name="Body"/><FieldRef Name="LastReplyBy"/><FieldRef Name="DiscussionLastUpdated"/><FieldRef Name="BestAnswerId"/><FieldRef Name="IsFeatured"/></ViewFields><Query><OrderBy UseIndexForOrderBy="TRUE" Override="TRUE"/><Where><Eq><FieldRef Name="IsAnswered"/><Value Type="Integer">0</Value></Eq></Where></Query></View>" |
SortItem3
|
Вопросы
с ответами
|
"<View><ViewFields><FieldRef Name="ID"/><FieldRef Name="PermMask"/><FieldRef Name="Created"/><FieldRef Name="Modified"/><FieldRef Name="Title"/><FieldRef Name="FSObjType"/><FieldRef Name="ContentTypeId"/><FieldRef Name="FileRef"/><FieldRef Name="LinkDiscussionTitle"/><FieldRef Name="Author"/><FieldRef Name="ItemChildCount"/><FieldRef Name="Body"/><FieldRef Name="LastReplyBy"/><FieldRef Name="DiscussionLastUpdated"/><FieldRef Name="BestAnswerId"/><FieldRef Name="IsFeatured"/></ViewFields><Query><OrderBy UseIndexForOrderBy="TRUE" Override="TRUE"/><Where><Eq><FieldRef Name="IsAnswered"/><Value Type="Integer">1</Value></Eq></Where></Query></View>" |
SortItem4
|
Популярные
|
"<View><ViewFields><FieldRef Name="ID"/><FieldRef Name="PermMask"/><FieldRef Name="Created"/><FieldRef Name="Modified"/><FieldRef Name="Title"/><FieldRef Name="FSObjType"/><FieldRef Name="ContentTypeId"/><FieldRef Name="FileRef"/><FieldRef Name="LinkDiscussionTitle"/><FieldRef Name="Author"/><FieldRef Name="ItemChildCount"/><FieldRef Name="Body"/><FieldRef Name="LastReplyBy"/><FieldRef Name="DiscussionLastUpdated"/><FieldRef Name="BestAnswerId"/><FieldRef Name="IsFeatured"/></ViewFields><Query><OrderBy UseIndexForOrderBy="TRUE" Override="TRUE"/><Where><Eq><FieldRef Name="IsFeatured"></FieldRef><Value Type="Integer">1</Value></Eq></Where></Query></View>" |
SortItem5
|
Мои
обсуждения
|
"<View><ViewFields><FieldRef Name="ID"/><FieldRef Name="PermMask"/><FieldRef Name="Created"/><FieldRef Name="Modified"/><FieldRef Name="Title"/><FieldRef Name="FSObjType"/><FieldRef Name="ContentTypeId"/><FieldRef Name="FileRef"/><FieldRef Name="LinkDiscussionTitle"/><FieldRef Name="Author"/><FieldRef Name="ItemChildCount"/><FieldRef Name="Body"/><FieldRef Name="LastReplyBy"/><FieldRef Name="DiscussionLastUpdated"/><FieldRef Name="BestAnswerId"/><FieldRef Name="IsFeatured"/></ViewFields><Query><OrderBy UseIndexForOrderBy="TRUE" Override="TRUE"/><Where><Eq><FieldRef Name="Author"/><Value Type="Integer"><UserID Type="Integer"/></Value></Eq></Where></Query></View>" |
SortItem6
|
Дата
публикации
|
|
SortItem7
|
Самые
новые
|
"<View><ViewFields><FieldRef Name="ID"/><FieldRef Name="PermMask"/><FieldRef Name="Created"/><FieldRef Name="Modified"/><FieldRef Name="Title"/><FieldRef Name="FSObjType"/><FieldRef Name="ContentTypeId"/><FieldRef Name="FileRef"/><FieldRef Name="LinkDiscussionTitle"/><FieldRef Name="Author"/><FieldRef Name="ItemChildCount"/><FieldRef Name="Body"/><FieldRef Name="LastReplyBy"/><FieldRef Name="DiscussionLastUpdated"/><FieldRef Name="BestAnswerId"/><FieldRef Name="IsFeatured"/></ViewFields><Query><OrderBy><FieldRef Name="Created" Ascending="FALSE"></FieldRef></OrderBy></Query></View>" |
SortItem8
|
Дата
публикации
|
|
SortItem9
|
Самые
новые
|
"<View><ViewFields><FieldRef Name="ID"/><FieldRef Name="PermMask"/><FieldRef Name="Created"/><FieldRef Name="Modified"/><FieldRef Name="Title"/><FieldRef Name="FSObjType"/><FieldRef Name="ContentTypeId"/><FieldRef Name="FileRef"/><FieldRef Name="LinkDiscussionTitle"/><FieldRef Name="Author"/><FieldRef Name="ItemChildCount"/><FieldRef Name="Body"/><FieldRef Name="LastReplyBy"/><FieldRef Name="DiscussionLastUpdated"/><FieldRef Name="BestAnswerId"/><FieldRef Name="IsFeatured"/></ViewFields><Query><OrderBy><FieldRef Name="Created" Ascending="FALSE"></FieldRef></OrderBy></Query></View>" |
SortItem10
|
Дата
публикации
|
|
SortItem11
|
Самые
новые
|
"<View><ViewFields><FieldRef Name="ID"/><FieldRef Name="PermMask"/><FieldRef Name="Created"/><FieldRef Name="Modified"/><FieldRef Name="Title"/><FieldRef Name="FSObjType"/><FieldRef Name="ContentTypeId"/><FieldRef Name="FileRef"/><FieldRef Name="LinkDiscussionTitle"/><FieldRef Name="Author"/><FieldRef Name="ItemChildCount"/><FieldRef Name="Body"/><FieldRef Name="LastReplyBy"/><FieldRef Name="DiscussionLastUpdated"/><FieldRef Name="BestAnswerId"/><FieldRef Name="IsFeatured"/></ViewFields><Query><OrderBy><FieldRef Name="Created" Ascending="FALSE"></FieldRef></OrderBy></Query></View>" |
SortItem12
|
Последние
|
|
SortItem13
|
Вопросы
без ответов
|
"<View><ViewFields><FieldRef Name="ID"/><FieldRef Name="PermMask"/><FieldRef Name="Created"/><FieldRef Name="Modified"/><FieldRef Name="Title"/><FieldRef Name="FSObjType"/><FieldRef Name="ContentTypeId"/><FieldRef Name="FileRef"/><FieldRef Name="LinkDiscussionTitle"/><FieldRef Name="Author"/><FieldRef Name="ItemChildCount"/><FieldRef Name="Body"/><FieldRef Name="LastReplyBy"/><FieldRef Name="DiscussionLastUpdated"/><FieldRef Name="BestAnswerId"/><FieldRef Name="IsFeatured"/></ViewFields><Query><OrderBy UseIndexForOrderBy="TRUE" Override="TRUE"/><Where><Eq><FieldRef Name="IsAnswered"/><Value Type="Integer">0</Value></Eq></Where></Query></View>" |
SortItem14
|
Вопросы
с ответами
|
"<View><ViewFields><FieldRef Name="ID"/><FieldRef Name="PermMask"/><FieldRef Name="Created"/><FieldRef Name="Modified"/><FieldRef Name="Title"/><FieldRef Name="FSObjType"/><FieldRef Name="ContentTypeId"/><FieldRef Name="FileRef"/><FieldRef Name="LinkDiscussionTitle"/><FieldRef Name="Author"/><FieldRef Name="ItemChildCount"/><FieldRef Name="Body"/><FieldRef Name="LastReplyBy"/><FieldRef Name="DiscussionLastUpdated"/><FieldRef Name="BestAnswerId"/><FieldRef Name="IsFeatured"/></ViewFields><Query><OrderBy UseIndexForOrderBy="TRUE" Override="TRUE"/><Where><Eq><FieldRef Name="IsAnswered"/><Value Type="Integer">1</Value></Eq></Where></Query></View>" |
SortItem15
|
Популярные
|
"<View><ViewFields><FieldRef Name="ID"/><FieldRef Name="PermMask"/><FieldRef Name="Created"/><FieldRef Name="Modified"/><FieldRef Name="Title"/><FieldRef Name="FSObjType"/><FieldRef Name="ContentTypeId"/><FieldRef Name="FileRef"/><FieldRef Name="LinkDiscussionTitle"/><FieldRef Name="Author"/><FieldRef Name="ItemChildCount"/><FieldRef Name="Body"/><FieldRef Name="LastReplyBy"/><FieldRef Name="DiscussionLastUpdated"/><FieldRef Name="BestAnswerId"/><FieldRef Name="IsFeatured"/></ViewFields><Query><OrderBy UseIndexForOrderBy="TRUE" Override="TRUE"/><Where><Eq><FieldRef Name="IsFeatured"></FieldRef><Value Type="Integer">1</Value></Eq></Where></Query></View>" |
SortItem16
|
Мои
обсуждения
|
"<View><ViewFields><FieldRef Name="ID"/><FieldRef Name="PermMask"/><FieldRef Name="Created"/><FieldRef Name="Modified"/><FieldRef Name="Title"/><FieldRef Name="FSObjType"/><FieldRef Name="ContentTypeId"/><FieldRef Name="FileRef"/><FieldRef Name="LinkDiscussionTitle"/><FieldRef Name="Author"/><FieldRef Name="ItemChildCount"/><FieldRef Name="Body"/><FieldRef Name="LastReplyBy"/><FieldRef Name="DiscussionLastUpdated"/><FieldRef Name="BestAnswerId"/><FieldRef Name="IsFeatured"/></ViewFields><Query><OrderBy UseIndexForOrderBy="TRUE" Override="TRUE"/><Where><Eq><FieldRef Name="Author"/><Value Type="Integer"><UserID Type="Integer"/></Value></Eq></Where></Query></View>" |
SortItem17
|
Дата
публикации
|
|
SortItem18
|
Самые
новые
|
"<View><ViewFields><FieldRef Name="ID"/><FieldRef Name="PermMask"/><FieldRef Name="Created"/><FieldRef Name="Modified"/><FieldRef Name="Title"/><FieldRef Name="FSObjType"/><FieldRef Name="ContentTypeId"/><FieldRef Name="FileRef"/><FieldRef Name="LinkDiscussionTitle"/><FieldRef Name="Author"/><FieldRef Name="ItemChildCount"/><FieldRef Name="Body"/><FieldRef Name="LastReplyBy"/><FieldRef Name="DiscussionLastUpdated"/><FieldRef Name="BestAnswerId"/><FieldRef Name="IsFeatured"/></ViewFields><Query><OrderBy><FieldRef Name="Created" Ascending="FALSE"></FieldRef></OrderBy></Query></View>" |
SortItem19
|
Дата
публикации
|
|
SortItem20
|
Самые
новые
|
"<View><ViewFields><FieldRef Name="ID"/><FieldRef Name="PermMask"/><FieldRef Name="Created"/><FieldRef Name="Modified"/><FieldRef Name="Title"/><FieldRef Name="FSObjType"/><FieldRef Name="ContentTypeId"/><FieldRef Name="FileRef"/><FieldRef Name="LinkDiscussionTitle"/><FieldRef Name="Author"/><FieldRef Name="ItemChildCount"/><FieldRef Name="Body"/><FieldRef Name="LastReplyBy"/><FieldRef Name="DiscussionLastUpdated"/><FieldRef Name="BestAnswerId"/><FieldRef Name="IsFeatured"/></ViewFields><Query><OrderBy><FieldRef Name="Created" Ascending="FALSE"></FieldRef></OrderBy></Query></View>" |
SortItem21
|
Дата
публикации
|
|
SortItem22
|
Самые
новые
|
"<View><ViewFields><FieldRef Name="ID"/><FieldRef Name="PermMask"/><FieldRef Name="Created"/><FieldRef Name="Modified"/><FieldRef Name="Title"/><FieldRef Name="FSObjType"/><FieldRef Name="ContentTypeId"/><FieldRef Name="FileRef"/><FieldRef Name="LinkDiscussionTitle"/><FieldRef Name="Author"/><FieldRef Name="ItemChildCount"/><FieldRef Name="Body"/><FieldRef Name="LastReplyBy"/><FieldRef Name="DiscussionLastUpdated"/><FieldRef Name="BestAnswerId"/><FieldRef Name="IsFeatured"/></ViewFields><Query><OrderBy><FieldRef Name="Created" Ascending="FALSE"></FieldRef></OrderBy></Query></View>" |
Так же заметил, что они каким то образом генерируется и могут быть и SortItem43
Комментариев нет:
Отправить комментарий