选主机收集整理的这篇文章主要介绍了织梦标签模板首页或列表页面调用畅言的评论数,选主机小编觉得挺不错的,现在分享给大家,也给大家做个参考。
使用目标页面的sourceId,推荐(点我查看什么是sourceId)
<span id = "sourceId::${sourceId}" class = "cy_cmt_count" ></span>
使用目标页面的url
<span id = "url::${topic_url}" class = "cy_cmt_count" ></span>
使用目标页面的topicId
<span id = "topicId::${topicId}" class = "cy_cmt_count" ></span>
页面最后,需要添加如下代码
<script id="cy_cmt_num" src="http://changyan.sohu.com/upload/plugins/plugins.list.count.js?clientId=cyrFzMEIb"></script >
下面是一个批量获取评论数的示例代码