步骤1:

      在编辑文章时指定分类。


OpenCms 按文章分类进行收集
 

 

步骤2:收集代码。

 

 

<cms:contentload collector="allKeyValuePairFiltered" 
 param="resource=/.content/DynamicnewsV1/|resourceType=DynamicnewsV1|categoryTypes=color/black/|subTree=false|sortBy=date|sortAsc=false" editable="true">

 <h1><cms:contentshow element="Title" /></h1>
</cms:contentload>

 

 

collector:收集方式。

resource:收集资源路径。

resourceType:资源类型。

categoryTypes:分类类型,可以有多个。

注:color/black/   该路径为default站点下 /.categories/color/ 路径

 

 


OpenCms 按文章分类进行收集
 

 转载请注明出处:http://yuxingliang.iteye.com/blog/2050266

 

 

 注意:被收集的数据的XSD文件需要设置分类字段的 “布局控件”,否则该分类数据不会被收集到。

<layout element="Category" widget="CategoryWidget" configuration="onlyleafs=false" />

 

 

 

 

 

 

创建索引可以参考一下网址:

http://wangyi878750.blog.sohu.com/85845116.html

http://www.myexception.cn/ai/449301.html

 

相关文章:

  • 2021-08-16
  • 2021-11-24
  • 2021-08-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
猜你喜欢
  • 2021-11-27
  • 2021-12-14
  • 2022-12-23
  • 2022-01-03
  • 2021-07-09
相关资源
相似解决方案