织梦正则自定义输出电脑版移动版上一篇下一篇文章

移动版上一篇下一篇

<li>
{dede:prenext get=pre runphp=yes}
$preurl = @me;
preg_match('/aid=(\d*)/',$preurl,$match);
$result = GetOneArchive($match[1]);
@me = !empty($result) ? "上一篇:<a href=\"/m{$result['arcurl']}\">{$result['title']}</a>" : "上一篇:没有了";
{/dede:prenext}
</li>
<li>
{dede:prenext get=next runphp=yes}
$preurl = @me;
preg_match('/aid=(\d*)/',$preurl,$match);
$result = GetOneArchive($match[1]);
@me = !empty($result) ? "下一篇:<a href=\"/m{$result['arcurl']}\">{$result['title']}</a>" : "下一篇:没有了";
{/dede:prenext}
</li>

电脑版上一篇下一篇

<li>
<a href="{dede:prenext get=pre runphp=yes}$url = @me;preg_match('/href=[\'\"]?([^\'\"]+)/', $url, $match);@me = $match[1];{/dede:prenext}">上一篇</a>
</li>
<li>
<a href="{dede:prenext get=next runphp=yes}$url = @me;preg_match('/href=[\'\"]?([^\'\"]+)/', $url, $match);@me = $match[1];{/dede:prenext}">下一篇</a>
</li>

猜你喜欢

转载自blog.csdn.net/dedehtml/article/details/80154180