我正在使用PyroCMS Pro 2.2.6,我想在菜单项中显示PyroCMS Stream中的项目总数;具体来说,我会动态显示数据库中的评论数量。
我尝试了各种不起作用的东西:
1。)我添加了一个Entry Looping标记(http://docs.pyrocms.com/2.1/manual/plugins/streams/entry-looping),因为菜单项字段不够大而被删除:
{{streams:reviews where =“review_status
='1'”}} {{total}} {{entries}} {{/ entries}} {{/ streams:cycle}}
2.。)我使用了Variable模块并为Entry Looping标记创建了一个变量,我将其添加到菜单项:{{variables:reviews_total}}。在菜单中没有显示任何内容。
3。)我使用Widget模块并为Entry Looping标记创建了一个widget实例,我将其添加到菜单项:{{widgets:instance id =“10”}}。在菜单中没有显示任何内容。
这就是菜单应该是什么样子,而“23”应该显示我的流中的记录数:
我有什么想法可以解决这个问题吗?
非常感谢,
菲利普