ppypp伦理天堂,91手机在线视频,免费在线观看黄色毛片,夜夜穞天天穞狠狠穞AV美女按摩

聯系官方銷售客服

1835022288

028-61286886

投訴 已解決 $myfield 也能正常顯示我自定義的字段 7 0
迅睿CMS版本:4.5.1

我有一個表單。$myfield 也能正常顯示我自定義的字段
模板就是編輯頁edit.html模板,只是我自定義了一個控制器。其實是就跟原來的編輯控制器是完全一樣的。

我想單獨顯示一個我自定義的一個字段(Ftable 類型),使用了文檔中的方法。

{dr_fieldform($ci->module['field']['thumb'], $thumb)}   成功顯示
{dr_fieldform($ci->module['field']['我的字段名'], $我的字段名)}  不成功,顯示 字段數據不存在

請問是我使用的方法不對么?

解決方案
  • 自定義了一個控制器的路徑是什么呢

  • index.php?s=member&app=goods&c=extask&m=edit_tender&id=84&cid=88

    edit_tender是我自定的edit

  • edit_tender 函數體內的代碼需要發出來看看

  • 就是Fcms.編輯的代碼完全復制

  • 回復@官方研發技術-阿華 這里是控制器代碼

    public function edit_tender() {
            
            $id = intval(\Phpcmf\Service::L('input')->get('id'));
            $did = 0;
            $this->is_get_catid = intval(\Phpcmf\Service::L('input')->get('catid'));
    
            if (defined('IS_MODULE_VERIFY')) {
                $draft = [];
            } else {
                $did = intval(\Phpcmf\Service::L('input')->get('did'));
                $did && $this->auto_save = 0; // 草稿數據時不加載
                $draft = $did ? $this->content_model->get_draft($did) : [];
            }
            list($tpl, $data) = $this->_Post($id, $draft);
            if (!$data) {
                $this->_msg(0, dr_lang('內容不存在'));
            } elseif ($this->uid != $data['uid']) {
                $this->_msg(0, dr_lang('無權限操作'));
            } elseif (defined('IS_MODULE_VERIFY') && $data['status'] != 0) {
                // 判斷是否來至審核
                $this->_msg(0, dr_lang('正在審核之中'));
            }
    
            $category = [];
            if (defined('IS_MODULE_VERIFY')) {
                // 審核文章編輯時采用投稿權限判斷
                // 可編輯的欄目
                $category = $this->_get_module_member_category($this->module, 'add');
                if (!$category[$data['catid']]) {
                    $this->_msg(0, dr_lang('當前欄目[%s]沒有發布權限', $this->module['category'][$data['catid']]['name']));
                }
            } else {
                if (!$this->is_hcategory) {
                    // 可編輯的欄目
                    $category = $this->_get_module_member_category($this->module, 'edit');
                    if (!$category[$data['catid']]) {
                        $this->_msg(0, dr_lang('當前欄目[%s]沒有修改權限', $this->module['category'][$data['catid']]['name']));
                    }
                } else {
                    $rt = $this->content_model->_hcategory_member_edit_auth();
                    if (!$rt['code']) {
                        $this->_msg(0, $rt['msg'], $rt['data']);
                    }
                }
            }
    
            \Phpcmf\Service::V()->assign([
                'did' => $did,
                'form' =>  dr_form_hidden(['is_draft' => 0, 'module' => $this->module['dirname'], 'id' => $id]),
                'select' => \Phpcmf\Service::L('Tree')->select_category(
                    $category,
                    $data['catid'],
                    'id=\'dr_catid\' name=\'catid\' onChange="show_category_field(this.value)"',
                    '--', 1, 1
                ),
                'is_verify' => defined('IS_MODULE_VERIFY') ? 1 : 0,
                'is_sync_cat' => defined('IS_MODULE_VERIFY') ? $data['sync_cat'] : '',
                'draft_url' =>\Phpcmf\Service::L('Router')->member_url($this->module['dirname'].'/home/edit', ['id' => $id]),
                'draft_list' => $this->content_model->get_draft_list('cid='.$id),
                'is_post_code' => $this->is_hcategory ? $this->content_model->_hcategory_member_post_code() : $this->is_post_code,
                'category_field_url' => $this->is_post_code || $this->module['category_data_field'] ? dr_member_url($this->module['dirname'].'/'.(defined('IS_MODULE_VERIFY') ? 'verify' : 'home').'/edit', ['id' => $id]) : ''
            ]);
            \Phpcmf\Service::V()->display('extask_tender.html');
        }
  • public function edit_tender() {
    
    var_dump($this->module['field']);

    看看有沒有什么數據

    滿意答案
    開源積分+10
  • @官方研發技術-阿華:已經用其他方法替代了。