我正在寻找一个解决方案来显示与定义的页面类型相对应的页面列表。我有下面的解决方案,在ASCX,但我正在寻找对应的宏为Kentico 10。
此宏将在类型页中的多选择字段中使用。
DocumentHelper.GetDocuments("MyPageType").OnCurrentSite().OrderByAscending("MyField");
发布于 2017-11-07 16:13:48
您可以使用这样的宏:
Documents["/%"].Children.WithAllData.Where("ClassName == 'MyPageType'").OrderBy("MyField").ApplyTransformation ("Your.Custom.RowTransformation", "<div class='content-before'>", "</div>");键是使用Documents对象
您也可以尝试此调用:
Documents.WithAllData.Where("NodeAliasPath LIKE '/%' AND ClassName = 'cms.menuitem'").OrderBy("DocumentName").ApplyTransformation ("Your.Custom.RowTransformation", "<div class='content-before'>", "</div>");https://stackoverflow.com/questions/47161404
复制相似问题