Answer the question
In order to leave comments, you need to log in
Why isn't the component template displayed?
I am new to 1C-Bitrix. When one of the system templates is selected, the menu is displayed normally. When choosing a custom template (from the list in the component parameters), nothing is displayed. No error is thrown either.
Component call code:
<?$APPLICATION->IncludeComponent(
"bitrix:menu",
"module_top",
array(
"ROOT_MENU_TYPE" => "top",
"MENU_CACHE_TYPE" => "N",
"MENU_CACHE_TIME" => "3600000",
"MENU_CACHE_USE_GROUPS" => "Y",
"MENU_THEME" => "site",
"CACHE_SELECTED_ITEMS" => "N",
"MENU_CACHE_GET_VARS" => array(
),
"MAX_LEVEL" => "2",
"CHILD_MENU_TYPE" => "subtop",
"USE_EXT" => "Y",
"DELAY" => "N",
"ALLOW_MULTI_SELECT" => "N",
"COMPONENT_TEMPLATE" => "module_top"
),
false
);?>
Answer the question
In order to leave comments, you need to log in
If anyone is interested, the error was in the template itself. The base was taken from a template with modified results. Outside of the area that hit "Edit as Text" there was a condition that interrupted the rendering of the template.
1. when installing the module, move the components to the appropriate folder (/local/components/component_name)
2. inside the component folder, a templates folder must be created containing folders with templates. The default template is called .default
3. inside the template folder, place the style.css and template.php files.
Thus, the path to the component template should be as follows:
/local/components/bitrix/menu/module_top/templates/.default/template.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question