尝试获取按类别和资产类型筛选的资产列表(例如博客)。我让AssetEntryQuery在python portlet中工作:
from com.liferay.portlet.asset.service.persistence import AssetEntryQuery
from com.liferay.portlet.asset.service import AssetEntryServiceUtil
aq = AssetEntryQuery()
aq.setAllCategoryIds([442492])
articles = AssetEntryServiceUtil.getEntries(aq)
for a in articles:
out.write(str(a.title))
out.write(str(a))
使用要查找的模型的FQCN在AssetEntryQuery中设置
className
,例如assetEntryQuery.setClassName(BlogsEntry.class.getName());
相关问题 更多 >
编程相关推荐