我希望能在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
add your field name like below code
<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
add your label and input field
<?php echo $this->form->getLabel('name'); ?>
<?php echo $this->form->getInput('name'); ?>
您可以在文章组件(com_content)中添加自定义字段,而无需更改核心文件。请参考此链接:http://docs.joomla.org/Adding_custom_fields_to_the_article_component
/components/com_content/models/article.php
文件的第84行左右添加对新字段的引用。 - ams