我已经使用博客应用程序,在BlogPost ContentType中添加了一个Category ContentType作为字段,并构建了一个查询,将Category分类到结果中。
但我在使用In-ValueProvider时遇到了麻烦。在示例here之后,Visual Query Designer似乎忽略了ModuleDataSource的传入值。
我已经仔细检查了In-Stream名称,我的实体名称,案例,TestParameters等.2sxc 8.44及更高版本中是否存在任何已知错误会导致此问题?我错过了什么?
在这种情况下,我使用的是RelationshipFilter。关系是“类别”。过滤器为“[In:Config:Category]”。我可以切换到[Querystring:Category]并且运行正常并运行我的所有代码。
感谢阅读。
答案 0 :(得分:0)
好的,我找到了解决方法。
事实证明,In-ValueProvider正在运作,但它正在努力解决我的 BlogPost 的类我认为因为 Category 是一个实体。
对于后台我有 BlogPost ContentType,类别 ContentType和文章主页标题 ContentType。 文章主页标题设置文章页面和类别实体的标题信息。
出于某种原因,RelationshipFilter在文章主页标题和 BlogPost 之间比较类别实体时遇到问题。我为我的过滤器尝试了以下操作并且都没有工作:
[在:配置:类别]
[在:配置:种类:标题]
我想知道这是一个区分大小写的问题,一个错误,还是我只是误解了过滤器的语法。
要解决此问题,我在文章主页标题中创建了一个名为 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’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’s young.</p>\n<p>As sports-related injuries and issues continue to dominate the headlines and influence programs throughout the country, laws like “return-to-play” 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"
}
}
]
}