内容详情中(show.html) 模板中调用方法是:
默认class写法:{dr_get_ftable(字段ID号, $字段名)} 自定义table的class写法:{dr_get_ftable(字段ID号, $字段名, 'mytableclass')} mytableclass就是给表格加class,解析为:table calss="mytableclass"
----------------按需输出列表的写法0------------
{php $field = \Phpcmf\Service::C()->get_cache('table-field', 这里填写Ftable字段的id号); $value = dr_string2array($字段名); }
{dr_lang($field['setting']['option']['first_cname'])} | {/if} {loop $field['setting']['option']['field'] $t} {if $t['type']}{dr_lang($t['name'])} | {/if} {/loop}
---|---|
{dr_lang($field['setting']['option']['hang'][$i]['name'])} | {/if} {loop $field['setting']['option']['field'] $n $t} {if $t['type']}{$val[$n]} | {/if} {/loop}
注意:
1、[字段名]需要换成你定义的具体字段英文名称
2、如果在list循环中调用,需要把[字段名]改成[$t.字段名]