业务经理

微信扫描以上二维码

028-61286886

技术咨询

官方的表格字段 Ftable 调用

迅睿框架 更新 2021-08-18 10:45:16 打杂的

请教下各位,官方

请教下各位大神,官方的表格字段 Ftable  调用;
{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'];};"> {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>

有没有同学分享2个实战代码的?我这个调用后系统报错。


{xunruicms_img_title}



一筹莫展啊。。。

方案

  • 迅睿框架技术-李波 #1 · 2021-08-10 18:02:00


    这里没有填写啊,当然要报错了
  • 打杂的 #2 · 2021-08-10 18:12:07
    迅睿框架技术-李波 {php $field = \Phpcmf\Service::C()->get_cache('table-field', 178); $value = dr_string2array($shoppinglist); } <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'];};"> {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>
  • 迅睿框架技术-李波 #3 · 2021-08-10 18:13:26


    这个文件200行是什么
  • 打杂的 #4 · 2021-08-18 10:44:35
    满意答案
    问题已经解决!
    这句官方代码 <th {if $t['width']}style="width:{php echo is_numeric($t['width']) ? $t['width'].'px' : $t['width'];};"> {dr_lang($t['name'])}</th>没有加if结束语

    正确代码因该如下:
    <th {if $t['width']}style="width:{php echo is_numeric($t['width']) ? $t['width'].'px' : $t['width'];};"{/if}> {dr_lang($t['name'])}</th>
  • 打杂的 #5 · 2021-08-18 10:45:16
    @打杂的:经过群内大神,已经解决

迅睿系统漏洞

外贸多语言建站
外贸多语言建站(2026-10-30)
修正对百度编辑器提取支持
AI文章生成器
AI文章生成器(2026-10-29)
任务插图设置数量
Bing站长数据
Bing站长数据(2026-10-29)
根据BING接口调整菜单 各个页面数据支持点击查看详情
按字段付费
按字段付费(2026-10-29)
按字段付费用于模块的字段设置一定的价格,当用户购买了此内容的字段时才...
泛解析站群系统
泛解析站群系统(2026-10-29)
AI队列增加清空按钮 表单提示语收敛 目录模式不接管主域名模板
账号注销
账号注销(2026-10-29)
用于用户中心的注销账号申请,后台审核通过后注销此账号。后台统一管理注...
邮件群发
邮件群发(2026-10-28)
修改模板的命名
自定义收款/捐款
自定义收款/捐款(2026-10-28)
自定义收款或捐款插件可以让用户快速创建付款或者捐款功能
CMS内容批量修改
CMS内容批量修改(2026-10-28)
后台批量修改文章内容的指定字段在插件后台可以任意指定字段
全站模块搜索
全站模块搜索(2026-10-28)
实现全模块一次性搜索内容,一键搜索全站内容精准搜索全部模块: