迅睿CMS框架是一款PHP8高性能·簡單易用的CMS開源開發框架,基于MIT開源許可協議發布,免費且不限制商業使用,是免費開源的產品,以萬端互聯為設計理念,支持的微信公眾號、小程序、APP客戶端、移動端網站、PC網站等多終端式管理系統。
聯系官方銷售客服
1835022288
028-61286886
欄目列表頁的文章排序,如何可以先排序 推薦的文章,然后再排序普通發布的文章
用什么樣的方法比較簡單的實現這個功能
則個有點復雜了,我研究研究
<?php $flag='';$table=MOD_DIR.'_flag';?> {table table_site=$table} <?php $t['id'] && $flag.=' WHEN '.$t['id'].' THEN '.($key+1);?> {/table} <?php // 先查詢推薦位的內容,然后加入到自定義排序中然他們靠前面 $flag && $order = urlencode(" CASE `id` ".$flag." ELSE 99 END,updatetime desc"); ?>
然后module標簽排序order改成:
order=$order
不知道可不可以,成與不成都回復一下
回復@迅睿框架聯合創始人
{module catid=$catid order=$order} <?php $flag='';$table=MOD_DIR.'_flag';?> {table table_site=$table} <?php $t['id'] && $flag.=' WHEN '.$t['id'].' THEN '.($key+1);?> {/table} <?php // 先查詢推薦位的內容,然后加入到自定義排序中然他們靠前面 $flag && $order = urlencode(" CASE `id` ".$flag." ELSE 99 END,updatetime desc"); ?> <li class="imgscale"> <a class="relative" href="{$t.url}"> <div class="img100"> <img src="{dr_thumb($t['thumb'], 300, 216, 0, 'crop')}"/> </div> <div class="xw-con"> <div class="table"> <div class="table-cell"> <div class="xw-txt"> <h4><div style="display:block; word-break: keep-all; white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">{$t.title}</div></h4> <span>{$t['updatetime']}</span> <p> {dr_strcut($t['description'], 180, '...')} </p> </div> </div> </div> </div> </a> </li>{/module}
怎么寫?不會啊
<?php $flag='';$table=MOD_DIR.'_flag';?> {table table_site=$table} <?php $t['id'] && $flag.=' WHEN '.$t['id'].' THEN '.($key+1);?> {/table} <?php // 先查詢推薦位的內容,然后加入到自定義排序中然他們靠前面 $flag && $order = urlencode(" CASE `id` ".$flag." ELSE 99 END,updatetime desc"); ?> {module catid=$catid order=$order} <li class="imgscale"> <a class="relative" href="{$t.url}"> <div class="img100"> <img src="{dr_thumb($t['thumb'], 300, 216, 0, 'crop')}"/> </div> <div class="xw-con"> <div class="table"> <div class="table-cell"> <div class="xw-txt"> <h4><div style="display:block; word-break: keep-all; white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">{$t.title}</div></h4> <span>{$t['updatetime']}</span> <p> {dr_strcut($t['description'], 180, '...')} </p> </div> </div> </div> </div> </a> </li>{/module}
則個有點復雜了,我研究研究
然后module標簽排序order改成:
不知道可不可以,成與不成都回復一下
回復@迅睿框架聯合創始人
怎么寫?不會啊