简体   繁体   English

Joomla! 管理面板中的自定义模块字段数据

[英]Joomla! custom module field data inside admin panel

I would like to know how is it possible to call PHP file from backend panel. 我想知道如何从后端面板调用PHP文件。 All should be done in the mod_.xml file 都应该在mod_.xml文件中完成

<fields name="params">
    <fieldset name="basic">
       <field
          name="myname"
          type="mycalledfile"
          label="mylabel"
          extension="mod_mymodule"
          description=""
       />
    </fieldset>
 </fields>

I found on the internet that extension attribute will call administrator/components/mod_mymodule/models/fields/mycalledfile.php , but thats wrong and I want to be able to call file from modules/ as this is a module. 我在互联网上发现extension属性将调用administrator/components/mod_mymodule/models/fields/mycalledfile.php ,但是那是错误的,我希望能够从modules/调用文件,因为这是一个模块。 My point is to get data from certain file, or from database call. 我的观点是从某些文件或数据库调用中获取数据。 Either way this has to be done somehow with the .xml file, so this is available via backend admin panel of the module. 无论哪种方式,都必须使用.xml文件来完成,因此可以通过模块的后台管理面板使用。

您可以在字段集中使用addfieldpath。

<fieldset name="basic"  addfieldpath="/administrator/components/mod_xml/models/fields">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM