Skip to content

Instantly share code, notes, and snippets.

@Pum-purum
Last active June 19, 2017 14:18
Show Gist options
  • Save Pum-purum/be8f2089e0ad6645f62c16a2f0fc4f24 to your computer and use it in GitHub Desktop.
Save Pum-purum/be8f2089e0ad6645f62c16a2f0fc4f24 to your computer and use it in GitHub Desktop.
Битрикс. Функция получает из URL код элемента
$arUrlTemplates = array(
"section" => "#SECTION_CODE#/",
"element" => "#SECTION_CODE#/#ELEMENT_CODE#/"
);
$arVariables = array();
$page = CComponentEngine::ParseComponentPath(GetDirPath($_SERVER["REAL_FILE_PATH"]), $arUrlTemplates, $arVariables);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment