Orchard CMS - dynamic query based on TaxonomyField of current content

一曲冷凌霜 提交于 2019-12-23 04:33:13

问题


I am looking into using Orchard CMS for an upcoming project and have hit a block. The site need to display articles of various types alongside a list of recent articles of the same type.

To that end I have:

  1. Created a custom ContentType called Article which includes a TaxonomyField for ArticleType.
  2. Created a custom theme with zones to reproduce the layout the customer requires. (Including RecentArticles.)
  3. Created a custom widget layer to show/hide the RecentArticles zone based on the current ContentType. (I.e. the RecentArticles zone is only populated when we are displaying an Article.)
  4. Created a Projection to show recent content of type Article.

I see that I can use the ArticleType taxonomy field to filter the source of the underlying query of part 4. However I need that filtering to be dynamic based on the ArticleType of the currently displaying content.

Is this possible? Is there an alternative way to reach the same result?

Thanks in advance.

来源:https://stackoverflow.com/questions/26261689/orchard-cms-dynamic-query-based-on-taxonomyfield-of-current-content

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!