0

我使用了博客应用程序,在 BlogPost ContentType 中添加了一个 Category ContentType 作为字段,并构建了一个查询以将 Category 因素纳入结果。

但是我在使用 In-ValueProvider 时遇到了问题。按照此处的示例,可视查询设计器似乎忽略了来自我的 ModuleDataSource 的传入值。

我的可视化查询

我已经仔细检查了 In-Stream 名称、我的实体名称、大小写、TestParameters 等。2sxc 8.44 及更高版本中是否有任何已知错误会导致此问题?我错过了什么?

在这种情况下,我使用的是关系过滤器。关系是“类别”。过滤器是“[In:Config:Category]”。我可以切换到 [Querystring:Category] ​​并且工作正常并运行我的所有代码。

谢谢阅读。

4

1 回答 1

0

好的,我找到了解决方法。

事实证明,In-ValueProvider 正在工作,但我认为它正在与我的BlogPost的类别作斗争,因为类别是一个实体。

对于背景,我有一个BlogPost ContentType、一个Category ContentType 和一个Articles Home Header ContentType。 文章主页标题设置文章页面和类别实体的标题信息。

由于某种原因,RelationshipFilter 无法比较Articles Home HeaderBlogPost之间的Category实体。我为我的过滤器尝试了以下方法,但都没有奏效:

[在:配置:类别]

[在:配置:类别:标题]

我想知道这是否是区分大小写的问题、错误,或者我只是误解了过滤器语法。

为了解决这个问题,我在我的文章主页标题中创建了一个名为TempCategory的临时字段,并将 [In:Config:TempCategory] ​​用于过滤器。

那行得通。

作为参考,这里是查询的一个片段:

{
  "Config": [
    {
      "Title": "Coaching Articles",
      "SubTitle": "",
      "Image": "/Portals/0/uploadedimages/AcademicPrograms/Christ_College/crosswise-hero.jpg",
      "ImageAlt": "Crosswise stained glass",
      "Category": [
        {
          "Id": 2716,
          "Title": "Coaching"
        }
      ],
      "Id": 3118,
      "Modified": "2016-06-21T10:44:21.9Z",
      "_2sxcEditInformation": {
        "sortOrder": 0
      }
    }
  ],
  "Paging": [
    {
      "Title": "Paging Information",
      "PageSize": 10,
      "PageNumber": 1,
      "ItemCount": 0,
      "PageCount": 0,
      "Id": 0,
      "Modified": "0001-01-01T00:00:00Z",
      "_2sxcEditInformation": {
        "entityId": 0,
        "title": "Paging Information"
      }
    }
  ],
,
  "Default": [
    {
      "Title": "Protect Your Players and Your Program: An Athletic Leader's Legal Duties",
      "UrlKey": "an-athletic-leaders-legal-duties",
      "PublishingGroup": null,
      "PublicationMoment": "2016-06-15T00:00:00Z",
      "Image": "/Portals/0/uploadedimages/AcademicPrograms/Graduate/Coaching/an_athletic_leaders_legal_duty.jpg",
      "ImageSquare": false,
      "Teaser": "<p>When the clock started on the new year earlier this month, all but one state joined the growing legal effort to protect and prevent concussions and head injuries among America&rsquo;s young.</p>",
      "Body": "<p><strong>When the clock started on the new year earlier this month,</strong> all but one state joined the growing legal effort to protect and prevent concussions and head injuries among America&rsquo;s young.</p>\n<p>As sports-related injuries and issues continue to dominate the headlines and influence programs throughout the country, laws like &ldquo;return-to-play&rdquo; are becoming a sign of the times when it comes to protecting players and athletic programs alike. The world of athletics is experiencing a significant shift in the perception of the roles and responsibilities of coaches, schools and athletic personnel.</p>",
      "DesignedContent": [],
      "Tags": [
        {
          "Id": 2576,
          "Title": "coaching"
        },
        {
          "Id": 2575,
          "Title": "management"
        },
        {
          "Id": 2574,
          "Title": "sports"
        },
        {
          "Id": 3035,
          "Title": "legal"
        }
      ],
      "Author": [
        {
          "Id": 3030,
          "Title": "Shaleek Blackburn"
        }
      ],
      "ImageAlt": "Referee holding a red",
      "Thumbnail": "",
      "ThumbnailAlt": "",
      "RelatedArticles": [
        {
          "Id": 2564,
          "Title": "Athletic Personnel's Duty To Warn"
        },
        {
          "Id": 2565,
          "Title": "Get A Better Grip On Bullying"
        },
        {
          "Id": 2717,
          "Title": "Good Coaching Develops Exceptional Athletes and People"
        }
      ],
      "Category": [
        {
          "Id": 2716,
          "Title": "Coaching"
        }
      ],
      "ArticleRelationships": null,
      "Id": 2513,
      "Modified": "2016-06-15T19:32:17.913Z",
      "_2sxcEditInformation": {
        "entityId": 2513,
        "title": "Protect Your Players and Your Program: An Athletic Leader's Legal Duties"
      }
    }  
  ]
}
于 2016-06-21T16:54:59.877 回答