迅睿cms栏目标签调用

作者: 小默 分类: php开发, seo营销, 网站建设, 迅睿cms 发布时间: 2021-12-11 17:52 ė
Warning: Use of undefined constant the_views - assumed 'the_views' (this will throw an Error in a future version of PHP) in /www/wwwroot/www.seohave.com/wp-content/themes/TangStyle/single.php on line 19
11,176 人访问
6没有评论

建站seo,让大家都有自信做好站,做网站运营维护

1、显示文章指定栏目1的数据,num表示显示10条,order表示按更新时间排序,默认cache缓存时间10小时

{module module=news catid=1 order=updatetime num=10}
标题:{$t.title}
地址:{$t.url}
描述:{$t.description}
更新时间:{$t.updatetime}
自定义更新时间:{dr_date($t._updatetime, 'Y-m-d')}
栏目名称:{dr_cat_value('news', $t.catid, 'name')}
栏目URL:{dr_cat_value('news', $t.catid, 'url')}
{/module}
{$debug} 表示调试信息是否出错

2、显示文章指定栏目1,2,3,4,5数据,num表示显示10条,order表示按人气排序

{module module=news catid=1,2,3,4 num=10 order=hits}
......
{/module}
{$debug} 表示调试信息是否出错

3、显示文章在站点2的数据

{module module=news site=2}
....
{/module}
{$debug} 表示调试信息是否出错

4、显示其他模块photo的数据

{module module=photo}
....
{/module}
{$debug} 表示调试信息是否出错

5、分页显示文章模块的栏目为10的数据(当存在catid参数时只需加page参数就能分页输出)

{module module=news catid=10 page=1}
.....
{/module}
{$debug} 表示调试信息是否出错
{$pages}表示分页输出代码

6、自定义分页显示文章模块的数据(本例子用于网站首页)

{module module=news page=1 pagesize=10 urlrule=index.php?page=[page]}
.....
{/module}
{$debug} 表示调试信息是否出错
{$pages}表示分页输出代码
pagesize表示指定分页显示数据量
urlrule【本参数至关重要】表示分页地址规则,[page]参数必须,否则分页链接不正常;例子中的index.php?page=[page]表示在首页进行分页,下页的链接是
inex.php?page=2,以此类推!

7、推荐位查询,flag表示推荐位的id号,后台可以看到,你懂得

{module module=news flag=1 num=10}
.....
{/module}
{$debug} 表示调试信息是否出错

8、错误排查方式,必须掌握,很实用

{module catid=1 num=10}
.....
{/module}
{$debug}:表示这段查询的sql语句解析
如果遇到查询错误,它会返回相关信息

9、显示news模块的带缩略图的10条文章并按时间先后顺序排列 

{module  module=news thumb=1 num=10 order=updatetime}
图片:{dr_thumb($t.thumb, 宽, 高, 是否水印)}或者 原图 {dr_get_file($t.thumb)}
.....
{/module}
{$debug} 表示调试信息是否出错

10、随机调用news模块的10条内容

{module  module=news order=RAND cache=0 num=10}
.....
{/module}
{$debug} 表示调试信息是否出错

11、调用栏目1的内容和模型字段的内容

{module  module=news catid=1 more=1}
.....
{/module}
{$debug} 表示调试信息是否出错
参数more=1表示调用模型字段,否则是不会显示模型字段的

12、栏目模型字段调用

{module module=news more=1}
.....
{/module}
{$debug} 表示调试信息是否出错
方法和内容字段一样 
参数more=1表示调用模型字段,否则是不会显示模型字段的

13、查询某个会员发布的news内容

{module module=news uid=会员id号}
....
{/module}
{$debug} 表示调试信息是否出错

14、查询当前内容的作者的全部发布news内容

{module module=news uid=$uid}
....
{/module}
{$debug} 表示调试信息是否出错

15、前端列表排序方式按照后台设定的排序值来显示方法

order=displayorder,updatetime

大家学习建站seo

迅睿建站是目前很好的一款开源免费的程序,互相交流,互相学习,有问题联系我,我的微信shensuyuncn,一起交流学习,有什么问题可以问我

本文出自 建站seo运营,转载时请注明出处及相应链接。

本文永久链接: https://www.seohave.com/718.html

0

发表回复

Ɣ回顶部