Answer the question
In order to leave comments, you need to log in
How to hide unnecessary Bitrix KP menu items?
Good afternoon, there is a left menu
Answer the question
In order to leave comments, you need to log in
Correctly put in the last parameter the code whose call will return true if the item needs to be displayed. It is better if it is a function call. This is for static items.
For example !$USER->IsAuthorized() to show the menu item only to unauthorized users.
Those. so for example:
global $USER;
$aMenuLinks = Array(
Array(
'Выход',
'/auth/?logout=yes',
Array(),
Array(),
'$USER->IsAuthorized()'
),
Array(
'Вход',
'/auth/',
Array(),
Array(),
'!$USER->IsAuthorized()'
),
);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question