ppypp伦理天堂,91手机在线视频,免费在线观看黄色毛片,夜夜穞天天穞狠狠穞AV美女按摩

聯系官方銷售客服

1835022288

028-61286886

投訴 已解決 如何可以先排序 推薦的文章,然后再排序普通發布的文章 4 0
迅睿CMS版本:4.5.2

欄目列表頁的文章排序,如何可以先排序 推薦的文章,然后再排序普通發布的文章

用什么樣的方法比較簡單的實現這個功能

解決方案
  • 則個有點復雜了,我研究研究

  • <?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}
    滿意答案
    開源積分+10
  • @迅睿框架聯合創始人:{module catid=$catid order=$order page=1} 加個page=1的頁數,其他測試沒有問題