Module ExpressionEngine自定义控制面板选项卡不工作
我正在尝试向我的发布条目表单添加一个选项卡,我有以下代码(为了简单起见进行了删减),但它不起作用: 在tab.my_module.php中:Module ExpressionEngine自定义控制面板选项卡不工作,module,expressionengine,Module,Expressionengine,我正在尝试向我的发布条目表单添加一个选项卡,我有以下代码(为了简单起见进行了删减),但它不起作用: 在tab.my_module.php中: public function display($channel_id, $entry_id = '') { $settings = array(); $settings = array( 'custom_field' => array( 'field_id' => 'cust
public function display($channel_id, $entry_id = '')
{
$settings = array();
$settings = array(
'custom_field' => array(
'field_id' => 'custom_field',
'field_label' => 'custom_field',
'field_type' => 'text'
)
);
return $settings;
}
public function install() {
ee()->layout->add_layout_tabs($this->tabs(), 'my_module');
}
public function tabs()
{
$tabs['my_module'] = array(
'custom_field'=> array(
'visible' => 'true',
'collapse' => 'false',
'htmlbuttons' => 'true',
'width' => '100%'
),
);
return $tabs;
}
在upd.my_module.php中:
public function display($channel_id, $entry_id = '')
{
$settings = array();
$settings = array(
'custom_field' => array(
'field_id' => 'custom_field',
'field_label' => 'custom_field',
'field_type' => 'text'
)
);
return $settings;
}
public function install() {
ee()->layout->add_layout_tabs($this->tabs(), 'my_module');
}
public function tabs()
{
$tabs['my_module'] = array(
'custom_field'=> array(
'visible' => 'true',
'collapse' => 'false',
'htmlbuttons' => 'true',
'width' => '100%'
),
);
return $tabs;
}
但是在我重新安装模块后,该选项卡没有出现,我缺少了什么?该问题是由lang文件中的样式信息引起的 新选项卡实际上包含在发布和编辑页面中,但选项卡标题中的样式不知何故导致新选项卡被隐藏
$lang = array(
'module_name' => 'My Module',
'module_description' => 'Brief description ',
'save_btn' => 'Save',
'save_btn_clicked' => 'Clicked',
'module_name' => '<style color="green">My Module</style>',
);
$lang=array(
“模块名称”=>“我的模块”,
“模块描述”=>“简要描述”,
“保存”=>“保存”,
“保存已单击”=>“已单击”,
“模块名称”=>“我的模块”,
);