迅睿CMS框架是一款PHP8高性能·簡單易用的CMS開源開發框架,基于MIT開源許可協議發布,免費且不限制商業使用,是免費開源的產品,以萬端互聯為設計理念,支持的微信公眾號、小程序、APP客戶端、移動端網站、PC網站等多終端式管理系統。
聯系官方銷售客服
1835022288
028-61286886
求助:想在列表頁下調用每篇文章內容里面所有圖片,圖片數量是可控。、
如效果
這個簡單,提取content字段的圖片就行了,你想提取幾張就幾張
類別選擇:content(在自定義字段管理里面看),名稱填寫:editor(也在自定義字段管理里面),前綴:填寫 t或者return指定的值,字段標簽生成工具:http://www.zbshanke.com/doc/code/field.html
前提content是主表字段才行
回復@迅睿開源社區技術-小白 內容頁下提取圖片還行。列表頁循環就不會了!
{content module=news id=$t.id return=r}
{php $arr =dr_get_content_img($r.content,3);}
{var_dump($arr)}
{/content}
使用content 標簽調用附表字段或者使用聯查
{php $table= SITE_ID.'_'.MOD_DIR.'_data_0';}
{module action=module catid=$catid join=$table on=id order=displayorder_desc,inputtime_desc page=1 pagesize=4 sbpage=1 urlrule=$urlrule}
這個簡單,提取content字段的圖片就行了,你想提取幾張就幾張
類別選擇:content(在自定義字段管理里面看),名稱填寫:editor(也在自定義字段管理里面),前綴:填寫 t或者return指定的值,字段標簽生成工具:http://www.zbshanke.com/doc/code/field.html
前提content是主表字段才行
回復@迅睿開源社區技術-小白 內容頁下提取圖片還行。列表頁循環就不會了!
{content module=news id=$t.id return=r}
{php $arr =dr_get_content_img($r.content,3);}
{var_dump($arr)}
{/content}
使用content 標簽調用附表字段或者使用聯查
{php $table= SITE_ID.'_'.MOD_DIR.'_data_0';}
{module action=module catid=$catid join=$table on=id order=displayorder_desc,inputtime_desc page=1 pagesize=4 sbpage=1 urlrule=$urlrule}