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

聯系官方銷售客服

1835022288

028-61286886

投訴 已解決 如何調用相關文章10條,如不足10條剩下條數顯示最新文章 4 0

如何調用相關文章10條,如不足10條剩下條數顯示最新文章?

解決方案
  • {module *** return=aa}{/module}
    
    {if dr_count($return_aa)<10}
    不足10個
    {else}
    足了正常顯示
    {module *** return=aa}{/module}
    {/if}
  • 回復@外聘專員-GOLANG工作室

    {module module=article catid=6 LIKE_title=$parent.name return=aa}{/module}

    {if dr_count($return_aa)<10}

    {module module=news catid=6 order=rand cache=3600}

    不足條數用最新文章籌夠10條

    {/module}

    {else}

    {module module=article catid=6 LIKE_title=$parent.name return=aa}

    有10條直接顯示

    {/module}

    {/if}

    以上測試不正確。感謝回復
    想要的效果是:
    相關文章1
    相關文章2
    最新1.....8條(相關只有2條。剩下8條顯示最新)

    相關文章1
    相關文章2
    相關文章3......10

  • 查推薦10條,計算結果數,不夠的,在用最新的查對應條數

    {module *** num=10 return=aa}
    
    {/module}
    {if dr_count($return_aa)<10}
    <?php
        $_t_end=10-dr_count($return_aa);
    ?>
    {module *** num=1,$_t_end return=aa}
    
    {/module}
    {/if}
    整站,前后端,小程序開發,疑難雜癥bug處理 Q:332943991
  • {module module=news LIKE_title=$parent.name num=10 return=aa}<p>{$aa.title}</p>{/module}
    {php $all = dr_count($return_aa);
      $num = 10 - $all;
    }
    
    {if $num >0}
    
    {module module=news num=$num order=rand cache=3600}
    
    不足條數用最新文章籌夠10條
    
    {/module}
    
    {/if}

    獲得相關文章的數量,然后高于10的話,不調用

    測試可行

    滿意答案
    短信幣+1
    功能定制/二次開發、任意程序轉迅睿、模版制作 QQ/微信:1174742835
  • @芝麻通:666,測試可行。