array MakeComponentUrlTemplates( array arDefaultUrlTemplates, array arCustomUrlTemplates );
The method is used with human-friendly URL's in compound components. The method takes default path templates and component path templates, and replaces default path templates with those overridden in the component input parameters.
Parameter | Description |
---|---|
arDefaultUrlTemplates | An array of default path templates. |
arCustomUrlTemplates | An array of path templates passed in the input parameters on the component. |
An array of path templates.
// if an array of the default path templates has
// the following format: $arDefaultUrlTemplates = array( "list" => "index.php", "element" => "#IBLOCK_ID#/#ELEMENT_ID#.php?SID=#SECTION_ID#" ); // and the following array is passed in the input parameters $arParams["SEF_URL_TEMPLATES"] = array( "element" => "#IBLOCK_ID#/#SECTION_ID#/#ELEMENT_ID#.php" ); // calling MakeComponentUrlTemplates: $arUrlTemplates = CComponentEngine::MakeComponentUrlTemplates($arDefaultUrlTemplates, $arParams["SEF_URL_TEMPLATES"]); // will create $arUrlTemplates: $arUrlTemplates = array( "list" => "index.php", "element" => "#IBLOCK_ID#/#SECTION_ID#/#ELEMENT_ID#.php" )
© 2001-2007 Bitrix | Bitrix Site Manager |