GetPagePath
string GetPagePath( string page = false, bool get_index_page=null );
The function returns path to the page relative to the root.
URL relative to root with parameters can be passed to the function. In this case, the function returns path to the page without parameters.
If a path without a file is passed to the function (for example: /en/about/, the function attempts to determine a directory index file. For example, if a directory index file is index.php, the return value is /ru/about/index.php.
Note. The algorithm used to find an index file is outlined in the topic on the GetDirIndex function.
Function parameters
Parameter | Description | Available from version |
---|---|---|
page | Page whose path is to be returned. false. If "false", the path to the current page is returned. Optional parameter. "False" by default.. | |
get_index_page | This parameter specifies if the path ending on "index.php" must be required for the section index page. If the parameter value is true, the path with "index.php" is returned, otherwise - path, ending with "/" is returned. Parameter status is regulated by the BX_DISABLE_INDEX_PAGE constant by default. If the value of constant is true, the parameter value by default is get_index_page=false. | |
obj | Service parameter. Optional parameter, by default equal to "false". | available from 7.1.1, deprecated from 8.5.0 version |
See Also
© «Bitrix24», 2001-2024