我想在Joomla 1.6 管理区域的文章编辑页面中插入一个自定义字段。请看截图。
http://screencast.com/t/vtLEBdUK
我试图编辑myjoomlasite/administrator/components/com_content/models/forms/article.xml
.
我可以在文章选项字段集中引入一个字段,但不能在主编辑区域。
我想在Joomla 1.6 管理区域的文章编辑页面中插入一个自定义字段。请看截图。
http://screencast.com/t/vtLEBdUK
我试图编辑myjoomlasite/administrator/components/com_content/models/forms/article.xml
.
我可以在文章选项字段集中引入一个字段,但不能在主编辑区域。
要在管理的文章编辑页面中插入自定义字段,您需要在两个文件中进行更改
myjoomlasite/administrator/components/com_content/models/forms/article.xml
添加您的字段名称,如下面的代码
<field name="name" type="text" label="JGLOBAL_NAME"
description="JFIELD_NAME_DESC" class="inputbox" size="30"
required="true" />
myjoomlasite/administrator/components/com_content/views/article/tmpl/edit.php
添加您的标签和输入字段
<?php echo $this->form->getLabel('name'); ?>
<?php echo $this->form->getInput('name'); ?>
我不建议修改核心文件来实现你想要的。
您可以使用 Joomla 的 CCK(内容构建工具包)之一来创建您的内容模板。
可用于 Joomla 的最佳免费 CCK:
您可以将自定义字段添加到文章组件(com_content),而无需更改此链接中的核心文件:http: //docs.joomla.org/Adding_custom_fields_to_the_article_component