Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Joomla的article.xml文件可以在模板中重写吗?_Php_Joomla_Joomla Template - Fatal编程技术网

Php Joomla的article.xml文件可以在模板中重写吗?

Php Joomla的article.xml文件可以在模板中重写吗?,php,joomla,joomla-template,Php,Joomla,Joomla Template,我正在Joomla 1.5中创建自定义的文章参数,并对文件/administrator/components/com_content/models/article.xml进行了黑客攻击。人们不鼓励对Joomla的核心文件进行黑客攻击,现在我希望遵循良好的做法 那么,我如何覆盖article.xml文件,使我的模板在文件的高级部分有自己的副本和自定义参数呢?如果它与我使用的大多数其他开源软件一样具有这种模板样式,那么您应该能够完全复制默认模板中的文件,添加到新模板并在那里修改它。例: 默认/a/b

我正在Joomla 1.5中创建自定义的文章参数,并对文件/administrator/components/com_content/models/article.xml进行了黑客攻击。人们不鼓励对Joomla的核心文件进行黑客攻击,现在我希望遵循良好的做法


那么,我如何覆盖article.xml文件,使我的模板在文件的高级部分有自己的副本和自定义参数呢?

如果它与我使用的大多数其他开源软件一样具有这种模板样式,那么您应该能够完全复制默认模板中的文件,添加到新模板并在那里修改它。例:

默认/a/b/article.xml->您的_模板/a/b/article.xml


我没有做太多的Joomla,而是其他开源PHP CMS和eComm系统,所以我不是很肯定,但很容易尝试。

如果我使用的大多数开源软件都有这种模板样式,那么您应该能够完全按照默认模板复制文件,添加到新模板并在那里修改它。例:

默认/a/b/article.xml->您的_模板/a/b/article.xml


我没有做太多的Joomla,而是其他开源PHP CMS和eComm系统,所以我不是很肯定,但很容易尝试。

您可以覆盖Joomla中的任何内容!果心在Joomla网站上查看此文档:

您可以覆盖来自Joomla的任何内容!果心在Joomla网站上查看此文档:

2.5或3.x版本

将article.xml添加到您的override for com_content/form文件夹中

在edit.php中添加此行

$this->form->loadFile( dirname(__FILE__) . DIRECTORY_SEPARATOR . "article.xml"); 
对于2.5或3.x

将article.xml添加到您的override for com_content/form文件夹中

在edit.php中添加此行

$this->form->loadFile( dirname(__FILE__) . DIRECTORY_SEPARATOR . "article.xml"); 
复制这些文件:

\administrator\components\com\u content\views\article\tmpl\edit.php \administrator\components\com\u content\models\forms\article.xml 到此位置:

C:\administrator\templates\isisyourtemplate\html\com\u content\article 然后编辑edit.php并在Html下添加::uu'formbehavior.selected','select';这两条线:

$this->form->reset( true );  
$this->form->loadFile( dirname(__FILE__) . DIRECTORY_SEPARATOR . "article.xml");
复制这些文件:

\administrator\components\com\u content\views\article\tmpl\edit.php \administrator\components\com\u content\models\forms\article.xml 到此位置:

C:\administrator\templates\isisyourtemplate\html\com\u content\article 然后编辑edit.php并在Html下添加::uu'formbehavior.selected','select';这两条线:

$this->form->reset( true );  
$this->form->loadFile( dirname(__FILE__) . DIRECTORY_SEPARATOR . "article.xml");

根据我的研究,没有办法覆盖article.xml。请参阅以下帖子:。因此,这必须通过破解核心Joomla文件来完成。根据我的研究,没有办法覆盖article.xml。请参阅本文:。因此,它必须通过破解核心Joomla文件来完成。不工作-它加载新表单但没有数据库条目不工作-它加载新表单但没有数据库条目