像下面这么多, 新增字段像,在发布页面,看上去就太多了
模型里面新增加了字段,因为字段太多了,发布页面非常不好,不美观,这个字段怎么样子排版啊
因为每一种食品营养成分表都不一定,新增字段就不知道如何办,能不能有其它办法......
营养成分表(每100克)
名称含量
热量278.00大卡
脂肪23.1克
碳水化合物一克
蛋白质16.7克
纤维素一克
镁14.00毫克
铁1.40毫克
锌3.36毫克
硫胺素0.30毫克
硒微克
钙14.00毫克
铜0.17毫克
钠62.60毫克
胡罗卜素一微克
烟酸4.5毫克
维生素C一毫克
核黄素0.16毫克
锰0.02毫克
磷135.00毫克
维生素E0.11毫克
胆固醇146毫克
维生素A5微克
钾230.00毫克
<!--显示自定义字段内容 field="picurl,title,content,keywords" 就是过滤掉不在里边重复显示的字段--> <style type="text/css">.OtherInfos .SideBox{clear:both;}.OtherInfos img{height:100px;float:left;margin:3px;}</style> <div class="OtherInfos"> {qb:showpage field="picurl,title,content,keywords,mv_url,myfid"} <div class="SideBox"> {if in_array($rs['type'],['images','images2','image','file','files','files2'])} <!-- 组图及多文件的显示方法\template\index_style\default\index\common\field.htm,其实不建议放在这里,影响布局,更多请查阅 http://help.php168.com/665693/ --> <div class="tag"><span>{$rs.title}</span></div> {include file="index@common/field" /} {else /} <div class="tag"><span>{$rs.title}</span></div> <div class="cont">{$rs.value}</div> {/if} </div> {/qb:showpage} </div>
前台默认模板有调用方法