迅睿CMS框架是一款PHP8高性能·簡(jiǎn)單易用的CMS開源開發(fā)框架,基于MIT開源許可協(xié)議發(fā)布,免費(fèi)且不限制商業(yè)使用,是免費(fèi)開源的產(chǎn)品,以萬端互聯(lián)為設(shè)計(jì)理念,支持的微信公眾號(hào)、小程序、APP客戶端、移動(dòng)端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
聯(lián)系官方銷售客服
1835022288
028-61286886
在module循環(huán)里面,如何在循環(huán)內(nèi)獲取前一個(gè)文章的時(shí)間
回復(fù)@迅??蚣芗夹g(shù)-陳老師
就是實(shí)現(xiàn)這種按天數(shù)歸檔的效果
{module module=yuyuzi catid=52 order=updatetime pagesize=10 page=1}
{if $time2==dr_date($t._updatetime, 'Y年m月d日') or $key==0}
<div class=kx-date>{dr_date($t._updatetime, 'Y年m月d日')} ? {php echo str_replace(['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'], ['周一', '周二', '周三', '周四', '周五', '周六', '周日'], dr_date($t._updatetime,'l'));}</div>{$t.id}
{/if}
<div class=kx-item data-id=927> <span class=kx-time>{dr_date($t._inputtime, 'H:i')}</span>
<div class=kx-content>
<h2>{$t.title}{$time2}</h2>
<p> {dr_strcut($t.description, 200)}
<a class="kx-more" href="{$t.url}" target="_blank" rel="noopener nofollow">[原文鏈接]</a>
</p>
</div>
<div class="kx-meta clearfix" data-url="{$t.url}">
<span class="j-mobile-share" data-id="927" data-qrcode="{$t.url}">
<i class="wpcom-icon wi">
<svg aria-hidden="true">
<use xlink:href="#wi-share"></use>
</svg>
</i> 生成海報(bào)
</span>
<span class="hidden-xs">分享到: </span>
<a class="share-icon wechat hidden-xs" target="_blank" data-share="wechat" data-share-callback="kx_share" rel="noopener">
<use xlink:href="#wi-wechat"></use>
</i>
</a>
<a class="share-icon weibo hidden-xs" target="_blank" data-share="weibo" data-share-callback="kx_share" rel="noopener">
<use xlink:href="#wi-weibo"></use>
<a class="share-icon qq hidden-xs" target="_blank" data-share="qq" data-share-callback="kx_share" rel="noopener">
<use xlink:href="#wi-qq"></use>
<a class="share-icon qzone hidden-xs" target="_blank" data-share="qzone" data-share-callback="kx_share" rel="noopener">
<use xlink:href="#wi-qzone"></use>
<span class="share-icon copy hidden-xs">
<use xlink:href="#wi-copy"></use>
{php $time=dr_date($t._updatetime, 'Y年m月d日')}
{/module}
{php $rt=[];} {module module=yuyuzi catid=52 order=updatetime pagesize=10 page=1} {php $time=dr_date($t._updatetime, 'Y年m月d日'); if (!isset($rt[$time])) { $rt[$time]=[];}; $rt[$time][] = $t;} {/module} {loop $rt $time $arr} {$time} --- {loop $arr $t} $t.title} {/loop} {/loop}
就幫你這么多了,主代碼就寫完了,后面細(xì)節(jié)靠你自己研究了
回復(fù)@迅??蚣芗夹g(shù)-陳老師 好的,辛苦了,我試試
回復(fù)@迅??蚣芗夹g(shù)-陳老師

就是實(shí)現(xiàn)這種按天數(shù)歸檔的效果
回復(fù)@迅??蚣芗夹g(shù)-陳老師
{module module=yuyuzi catid=52 order=updatetime pagesize=10 page=1}
{if $time2==dr_date($t._updatetime, 'Y年m月d日') or $key==0}
<div class=kx-date>{dr_date($t._updatetime, 'Y年m月d日')} ? {php echo str_replace(['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'], ['周一', '周二', '周三', '周四', '周五', '周六', '周日'], dr_date($t._updatetime,'l'));}</div>{$t.id}
{/if}
<div class=kx-item data-id=927> <span class=kx-time>{dr_date($t._inputtime, 'H:i')}</span>
<div class=kx-content>
<h2>{$t.title}{$time2}</h2>
<p> {dr_strcut($t.description, 200)}
<a class="kx-more" href="{$t.url}" target="_blank" rel="noopener nofollow">[原文鏈接]</a>
</p>
</div>
<div class="kx-meta clearfix" data-url="{$t.url}">
<span class="j-mobile-share" data-id="927" data-qrcode="{$t.url}">
<i class="wpcom-icon wi">
<svg aria-hidden="true">
<use xlink:href="#wi-share"></use>
</svg>
</i> 生成海報(bào)
</span>
<span class="hidden-xs">分享到: </span>
<a class="share-icon wechat hidden-xs" target="_blank" data-share="wechat" data-share-callback="kx_share" rel="noopener">
<i class="wpcom-icon wi">
<svg aria-hidden="true">
<use xlink:href="#wi-wechat"></use>
</svg>
</i>
</a>
<a class="share-icon weibo hidden-xs" target="_blank" data-share="weibo" data-share-callback="kx_share" rel="noopener">
<i class="wpcom-icon wi">
<svg aria-hidden="true">
<use xlink:href="#wi-weibo"></use>
</svg>
</i>
</a>
<a class="share-icon qq hidden-xs" target="_blank" data-share="qq" data-share-callback="kx_share" rel="noopener">
<i class="wpcom-icon wi">
<svg aria-hidden="true">
<use xlink:href="#wi-qq"></use>
</svg>
</i>
</a>
<a class="share-icon qzone hidden-xs" target="_blank" data-share="qzone" data-share-callback="kx_share" rel="noopener">
<i class="wpcom-icon wi">
<svg aria-hidden="true">
<use xlink:href="#wi-qzone"></use>
</svg>
</i>
</a>
<span class="share-icon copy hidden-xs">
<i class="wpcom-icon wi">
<svg aria-hidden="true">
<use xlink:href="#wi-copy"></use>
</svg>
</i>
</span>
</div>
</div>
{php $time=dr_date($t._updatetime, 'Y年m月d日')}
{/module}
就幫你這么多了,主代碼就寫完了,后面細(xì)節(jié)靠你自己研究了
回復(fù)@迅??蚣芗夹g(shù)-陳老師 好的,辛苦了,我試試