文件位于 component\dm-include\file_formpost \formpost_datatest.php
数组变量的值:arr_jthomev_news_cate 编辑的值:jthomev_news_cate
使用方法:
在jthome页面加载: require INCLUDE_ROOT.'file_formpost/formpost_datainc.php';
------------
有了这些数组后,只要在前端代码里,写上foreach就能输出,从而嵌套在html里。
foreach(数组变量 as $k=>$v ){
...代码...
if($k>5) break;
}
------------
前台编辑链接: edit_node_inblock($var,__FILE__); (父级再加class,值为block)
------------
测试图片: $img = jthomerepimg($img,'jthome_page12/images/pro'.($k+1).'.jpg');
------------
具体请看首页内容模板的视频教程>
产品最新 - 因为 sta_new 为y
产品推荐 - 因为 sta_tj 为y
产品热门 - 因为 hit 值最高
Array
(
[catename] => 新闻中心
[catelink] => http://slider.demo.demososo.com/news.html
[catename_cur] => 新闻中心
[catename_curlink] => http://slider.demo.demososo.com/news.html
[datares] => yes
[data] => Array
(
[0] => Array
(
[id] => 9
[name] => 公司新闻1
[pidname] => csub20150805_1133441588
[pid] => cate20150805_1133251007
[ppid] => cate20150805_1133251007
[link] => http://slider.demo.demososo.com/category-9.html
)
[1] => Array
(
[id] => 10
[name] => 公司新闻2
[pidname] => csub20150805_1133512388
[pid] => cate20150805_1133251007
[ppid] => cate20150805_1133251007
[link] => http://slider.demo.demososo.com/category-10.html
)
[2] => Array
(
[id] => 11
[name] => 公司新闻3
[pidname] => csub20150805_1133597884
[pid] => cate20150805_1133251007
[ppid] => cate20150805_1133251007
[link] => http://slider.demo.demososo.com/category-11.html
)
[3] => Array
(
[id] => 40
[name] => 公司新闻4
[pidname] => csub20160603_1044113807
[pid] => cate20150805_1133251007
[ppid] => cate20150805_1133251007
[link] => http://slider.demo.demososo.com/category-40.html
)
)
)