如何在 Joomla 1.6 文章编辑器中插入自定义字段?

发布于 2024-11-25 02:49:46 字数 304 浏览 6 评论 0原文

我想在 Joomla 1.6 管理区域的文章编辑页面中插入自定义字段。请看截图。

http://screencast.com/t/vtLEBdUK

我尝试编辑 myjoomlasite/administrator/组件/com_content/models/forms/article.xml

我可以在文章选项字段集中引入字段,但不能在主编辑区域中引入字段。

I want to insert a custom field in the Article edit page in the administration area of Joomla 1.6. Please see screenshot.

http://screencast.com/t/vtLEBdUK

I have tried to edit myjoomlasite/administrator/components/com_content/models/forms/article.xml.

I can introduce a field in the article options fieldset, but not in the main edit area.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

谎言月老 2024-12-02 02:49:46

我不建议修改核心文件来实现你想要的。

您可以使用 Joomla 的 CCK(内容构建工具包)之一来创建内容模板。

Joomla 可用的最佳免费 CCK :

  1. Form2Content (我最喜欢的)
  2. K2(最受欢迎,强烈推荐)

您可以在 Joomla 扩展目录

I wouldn't recommend modifying the core files to achieve what you want.

You could use one of Joomla's CCK (content construction kits) to create your content templates.

Best free CCKs available for Joomla :

  1. Form2Content (my favorite)
  2. K2 (most popular, highly recommended)

You can find more in Joomla Extension Directory

み格子的夏天 2024-12-02 02:49:46

要在管理中的文章编辑页面中插入自定义字段,您需要更改两个文件

  1. myjoomlasite/administrator/components/com_content/models/forms/article.xml

    添加您的字段名称,如下面的代码

    <字段名称=“名称”类型=“文本”标签=“JGLOBAL_NAME”
        描述=“JFIELD_NAME_DESC”类=“输入框”大小=“30”
        必需=“真”/>
    
  2. myjoomlasite/administrator/components/com_content/views/article/tmpl/edit.php

    添加标签和输入字段

    form->getLabel('name'); ?>
    form->getInput('name'); ?>
    

For insert a custom field in the Article edit page in the administration you need to change in two files

  1. 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" />
    
  2. 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'); ?>
    
孤者何惧 2024-12-02 02:49:46

您可以将自定义字段添加到文章组件(com_content),而无需更改此链接中的核心文件:http:// /docs.joomla.org/Adding_custom_fields_to_the_article_component

you can add custom fields to the article component (com_content), without the need to change core files in this link: http://docs.joomla.org/Adding_custom_fields_to_the_article_component

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文