product_category.php里
$product_list[] = array (
"id" => $row['id'],
"cat_id" => $row['cat_id'],
"name" => $row['name'],
"price" => $price,
"thumb" => $dou->dou_file($row['image'], true),
"image" => $dou->dou_file($row['image']),
"defined" => $dou->format_defined($row['defined']),
"add_time" => $add_time,
"add_time_short" => $add_time_short,
"add_time_year" => $add_time_year,
"add_time_day" => $add_time_day,
"summary" => $row['summary'],
"description" => $description,
"url" => $url
);
// 获取产品信息
$product = $dou->get_row('product', '*', "id = '$id'");
$smarty->assign('defined', $dou->format_defined($product['defined']));
product_category.dwt里
<!-- {foreach from=$product_list name=product_list item=product} -->
<h4>{$product.name}</h4>
<!-- {foreach from=$defined name=defined item=defined} -->{$defined.arr}:{$defined.value}<!-- {/foreach} -->
<!-- {/foreach} -->
由招投标资质网于2020-06-27 12:34回答
<!-- {foreach from=$defined name=defined item=defined} -->{$defined.arr}:{$defined.value}<!-- {/foreach} --> 不生效
有用(0) 没用(0)