帝国cms常见问题:使用灵动标签调用上一篇下一篇的方法

多时候,我们为了网站的更加美观,或者让网页更强的用户体验,我们不得不改变帝国本身的设计说正事开始:帝国默认的上一篇、下一篇链接比较单一,无法满足个性化,如下:下一篇链接:

多时候,我们为了网站的更加美观,或者让网页更强的用户体验,我们不得不改变帝国本身的设计hdMECMSPLUS

说正事开始:hdMECMSPLUS

帝国默认的上一篇、下一篇链接比较单一,无法满足个性化,如下:hdMECMSPLUS

下一篇链接:[!--info.next--]hdMECMSPLUS

上一篇链接:[!--info.pre--]hdMECMSPLUS

用灵动标签调用上、下一篇链接,标题可截取字数,可自定义显示文字,或用图标代替:hdMECMSPLUS

帝国CMS(EmpireCMS)使用灵动标签调用上一篇下一篇的方法hdMECMSPLUS

帝国灵动标签调用上一篇下一篇的代码如下,根据自己的需要来更改即可。hdMECMSPLUS

 hdMECMSPLUS

  <ul>hdMECMSPLUS
<li>hdMECMSPLUS

[e:loop={'selfinfo',1,0,0,'id>'.$navinfor[id].'','id asc'}]hdMECMSPLUS

<a href="<?phphdMECMSPLUS

echo $bqsr[titleurl];hdMECMSPLUS

$pre='true';hdMECMSPLUS

?>">hdMECMSPLUS

<i><em>上一篇</em><img src="<?=$bqr[titlepic]?>"></i>hdMECMSPLUS
              <h2><?=$bqr[title]?></h2>hdMECMSPLUS
              <p><?=$bqr[smalltext]?>hdMECMSPLUS
       </p>hdMECMSPLUS
              </a></li>    hdMECMSPLUS

hdMECMSPLUS
[/e:loop]hdMECMSPLUS
<li>hdMECMSPLUS

[e:loop={'selfinfo',1,0,0,'id<'.$navinfor[id].'','id desc'}]hdMECMSPLUS

<a href="<?phphdMECMSPLUS

echo $bqsr[titleurl];hdMECMSPLUS

$pre='true';hdMECMSPLUS

?>">hdMECMSPLUS

<i><em>下一篇</em><img src="<?=$bqr[titlepic]?>"></i>hdMECMSPLUS
              <h2><?=$bqr[title]?></h2>hdMECMSPLUS
              <p><?=$bqr[smalltext]?>hdMECMSPLUS
       </p>hdMECMSPLUS
              </a></li>    hdMECMSPLUS
[/e:loop]hdMECMSPLUS

<?phphdMECMSPLUS

if(empty($pre)){hdMECMSPLUS

echo "上一篇:很抱歉没有了";hdMECMSPLUS

}hdMECMSPLUS

?>hdMECMSPLUS

       hdMECMSPLUS
          </ul>hdMECMSPLUS

 hdMECMSPLUS

 hdMECMSPLUS

其他答案
2020-09-17 14:58:13
热心网友
还是帝国自带的简单,我也觉得很好看啊!

如下示例代码:

<p>&nbsp; &lt;ul&gt;<br />&lt;li&gt;</p><p>[e:loop={&#39;selfinfo&#39;,1,0,0,&#39;id&gt;&#39;.$navinfor[id].&#39;&#39;,&#39;id asc&#39;}]</p><p>&lt;a href=&quot;&lt;?php</p><p>echo $bqsr[titleurl];</p><p>$pre=&#39;true&#39;;</p><p>?&gt;&quot;&gt;</p><p>&lt;i&gt;&lt;em&gt;上一篇&lt;/em&gt;&lt;img src=&quot;&lt;?=$bqr[titlepic]?&gt;&quot;&gt;&lt;/i&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;h2&gt;&lt;?=$bqr[title]?&gt;&lt;/h2&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;&lt;?=$bqr[smalltext]?&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp;&lt;/p&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/a&gt;&lt;/li&gt; &nbsp; &nbsp;</p><p><br />[/e:loop]<br />&lt;li&gt;</p><p>[e:loop={&#39;selfinfo&#39;,1,0,0,&#39;id&lt;&#39;.$navinfor[id].&#39;&#39;,&#39;id desc&#39;}]</p><p>&lt;a href=&quot;&lt;?php</p><p>echo $bqsr[titleurl];</p><p>$pre=&#39;true&#39;;</p><p>?&gt;&quot;&gt;</p><p>&lt;i&gt;&lt;em&gt;下一篇&lt;/em&gt;&lt;img src=&quot;&lt;?=$bqr[titlepic]?&gt;&quot;&gt;&lt;/i&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;h2&gt;&lt;?=$bqr[title]?&gt;&lt;/h2&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;&lt;?=$bqr[smalltext]?&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp;&lt;/p&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/a&gt;&lt;/li&gt; &nbsp; &nbsp;<br />[/e:loop]</p><p>&lt;?php</p><p>if(empty($pre)){</p><p>echo &quot;上一篇:很抱歉没有了&quot;;</p><p>}</p><p>?&gt;</p><p>&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/ul&gt;</p><p>&nbsp;</p><p>&nbsp;</p>
分享到 :
相关推荐

发表评论

登录... 后才能评论

评论(3)

加入本站VIP会员订阅计划,海量资源免费下载查看

目前为止共有3位优秀的VIP会员加入!

立即加入VIP会员