Kentico 10 PageType 宏列表

Kentico 10 Macro List of PageType

我正在寻找一种解决方案来显示与定义的页面类型相对应的页面列表。我在 ASCX 中有以下解决方案,但我正在寻找 Kentico 10 宏中的对应关系。

此宏将用于类型页面的多选字段。

DocumentHelper.GetDocuments("MyPageType").OnCurrentSite().OrderByAscending("MyField");

您可以像这样使用宏:

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>");