成语| 古诗大全| 扒知识| 扒知识繁体

当前位置:首页 > 趣味生活

调用最新文章添加上一页和下一页

Q1:phpcms文章怎么调用显示上一页下一页

  • {$previous_page[title]}

  • {$next_page[title]}
  • Q2:phpcms文章页如何加上一页下一页

    首先:在show.php里"include template(phpcms, $template);"前直接添加以下代码就可以调用了
    代码://<添加自定义代码>
    $more_pre = $db->get_one("SELECT title,url FROM `".DB_PRE."content` WHERE `contentid`<$contentid and catid=$catid order by contentid desc limit 0,1");
    $more_next = $db->get_one("SELECT title,url FROM `".DB_PRE."content` WHERE `contentid`>$contentid and catid=$catid order by contentid asc limit 0,1");
    //
    在模板文件中(show.html)调用方式
    代码:


    这是2008的。 v9和这个同理,自己敲代码。

    Q3:dedecms文章页的首页、末页、上一页、下一页的调用标签。谢啦哦

    默认模版中有,自己找

    Q4:phpcms文章页如何显示上一页下一页

    phpcms文章页要显示上一页下一页效果并不难,下面的代码大家不妨参考下,或许有所帮助

    本文主要分享了phpcms文章页显示上一页下一页的代码如下:

    复制代码代码如下:


    {getsql="select * from phpcms_content where contentid>$contentid andcatid=$catid order by contentid" rows="1"}上一条:{str_cut($r[title],50,)}

    {/get}
    {get sql="select * fromphpcms_content where contentid<$contentid and catid=$catid order bycontentid desc" rows="1"}
    下一条:{str_cut($r[title],50,)}
    {/get}

    W∴ww.bAzHIshi.coM

    最新文章

    猜你喜欢

    更多