Answer the question
In order to leave comments, you need to log in
Why doesn't the module page open in Bitrix?
Created a module following the example https://github.com/may-cat/maycat.d7dull
in the folder with the module created the admin folder, it contains two files:
menu.php - file with the
invoice_index.php menu structure
The module was installed, the items added to the menu also appeared, but when I try to open invoice_index.php it gives error 404.
I found in the documentation that this file should be included from the bitrix/admin folder. It
also says that when installing the module, these files should be copied to the admin folder and deleted when the module is removed. I just can’t understand, should they be automatically copied there, or do I need to write it myself in the doInstall () method?
Answer the question
In order to leave comments, you need to log in
You need it yourself.
Make the /install/admin directory in the module directory and put everything that needs to be copied to admin there.
It should be a file with the following content:
<?
require($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/НазваниеВашегоМодуля/admin/invoice_index.php');
?>
function InstallFiles($arParams = array()) {
CopyDirFiles(
$_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/НазваниеВашегоМодуля/install/admin',
$_SERVER['DOCUMENT_ROOT'].'/bitrix/admin',
true,
true
);
return true;
}
No need to create a module by copying another, use the module constructor.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question