联系官方销售客服

1835022288

028-61286886

开发框架 版主:迅睿框架研发组
如何调用表格字段 Ftable里的首行
类型:迅睿CMS 更新时间:2024-08-08 20:48:00 内容模块 CodeIgniter

请问内容模块里的表格 Ftable字段,如何调用首行内容?

微信截图_20240808202228



我看了文档,只有调用列的数据。


回帖
  • 原告
    #1楼    原告
    2024-08-08 20:48:00
    Chrome 0
    {php $field = \Phpcmf\Service::C()->get_cache('table-field', 这里填写Ftable字段的id号); $value = dr_string2array($字段名); }
    <table>
        <thead>
        <tr>
            {if ($field['setting']['option']['is_first_hang'] && !$field['setting']['option']['is_add'])}
            <th> {dr_lang($field['setting']['option']['first_cname'])} </th>
            {/if}
            {loop $field['setting']['option']['field'] $t}
            {if $t['type']}
            <th {if $t['width']}style="width:{php echo is_numeric($t['width']) ? $t['width'].'px' : $t['width'];};"{/if}> {dr_lang($t['name'])}</th>
            {/if}
            {/loop}
        </tr>
        </thead>
        <tbody>
        {php $i = 1;}
        {loop $value $ii $val}
        <tr>
            {if ($field['setting']['option']['is_first_hang'] && !$field['setting']['option']['is_add'])}
            <td> {dr_lang($field['setting']['option']['hang'][$i]['name'])} </td>
            {/if}
            {loop $field['setting']['option']['field'] $n $t}
            {if $t['type']}
            <td>{$val[$n]}</td>
            {/if}
            {/loop}
        </tr>
        {php $i++;}
        {/loop}
        </tbody>
    </table>