1.建立一个自定义JS模板:模板内容如下:
[!--empirenews.listtemp--]<a href='/e/search/result/?searchid=[!--id--]'>[!--title--]([!--writer--])</a> [!--empirenews.listtemp--]
**解释:这里的writer字段本来是作者,但这里不需要,我们把他用来过度接收点击数OnClick字段.**
2.新建自定义JS,查询sql语句如下,记得将模板选为刚刚我们新建的模板:
select searchid as id,keyboard as title,onclick as writer from [!db.pre!]enewssearch where iskey=0 order by onclick desc limit 10