SetUrlTemplates
void
CIBlockResult::SetUrlTemplates(
array DetailUrl = "",
array SectionUrl = "",
array ListUrl = ""
);
The method returns path templates for elements, sections and element lists instead on those indicated in the iblock settings. Templates will be used by the method CIBlockResult::GetNext. Non-static method.
Note: The method is used for correct generation of paths if corresponding parameters are specified.
Call parameters
Parameter | Description |
---|---|
DetailUrl | Template for element path. When not specified, the path is sourced from the iblock settings.
|
SectionUrl | Template for section path. When not specified, the path is sourced from the iblock settings. |
ListUrl | Template for path of element list. When not specified, the path is sourced from the iblock settings. |
Returned value
Nothing.
See Also
Examples
<?
$rsElements = CIBlockElement::GetList(array(), array("ID" => $ID), false, false, array("ID", "NAME", "DETAIL_PAGE_URL"));
$rsElements->SetUrlTemplates("/catalog/#SECTION_CODE#/#ELEMENT_CODE#.php");
$arElement = $rsElements->GetNext();
?>
© «Bitrix24», 2001-2024