织梦模型内容页输出上一篇下一篇

{dede:field.id runphp=yes}

global $dsql,$id,$aid,$typeid;

$myid = isset($id) ? $id : $aid;

$preR =  $dsql->GetOne("Select id,channel From `dede_arctiny` where id<$myid And arcrank>-1 And typeid=$typeid order by id desc limit 1");

$arc = GetOneArchive($preR['id']);

@me = "<a href='{$arc[arcurl]}'>{$arc[title]}</a>";

{/dede:field.id}

</li>

 

<li>

一篇

{dede:field.id runphp=yes}

global $dsql,$id,$aid,$typeid;

$myid = isset($id) ? $id : $aid;

$preR =  $dsql->GetOne("Select id,channel From `dede_arctiny` where id>$myid And arcrank>-1 And typeid=$typeid order by id asc limit 1");

$arc = GetOneArchive($preR['id']);

@me = "<a href='{$arc[arcurl]}'>{$arc[title]}</a>";

{/dede:field.id}

</li>

独立模型内容输出一篇一篇 - 写法二

<li>

{dede:sql sql="SELECT * FROM dede_arctiny WHERE id<~id~ And arcrank>-1 And typeid=~typeid~ order by id desc limit 1"}

一篇:<a href=https://www.91084.com/"[field:id runphp=yes]$id=@me;$arc=GetOneArchive($id);@me=$arc['arcurl'];[/field:id]">[field:id runphp=yes]$id=@me;$arc=GetOneArchive($id);@me=$arc['title'];[/field:id]</a>

{/dede:sql}

</li>

 

<li>

{dede:sql sql="SELECT * FROM dede_arctiny WHERE id>~id~ And arcrank>-1 And typeid=~typeid~ order by id asc limit 1"}

下一篇:<a href=https://www.91084.com/"[field:id runphp=yes]$id=@me;$arc=GetOneArchive($id);@me=$arc['arcurl'];[/field:id]">[field:id runphp=yes]$id=@me;$arc=GetOneArchive($id);@me=$arc['title'];[/field:id]</a>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wsfddf.html