Documentation

PreparePath

string
CBlog::PreparePath(
 string blogUrl,
 string siteID = false,
 bool   is404 = true,
);

The method returns path to blog with the blogUrl address relative to root of the site with siteID and with account of public section (with 404 handler and without it). Non-static method.

Method parameters

ParameterDescriptionAvailable from version
blogUrl Bog URL address.
siteID Site.
Optional. By default false - current site is sourced.
is404 Specifies, whether 404 handler is used in the public section. Optional. By default true - blogs public section operates based on the 404 error handler.
userID Optional parameter. By default value - 0.
groupID Optional parameter. By default value - 0.

Returned value

Path to the blog relative to site root is returned.

Examples of use

<?
echo '<a href="'.CBlog::PreparePath("admin-blog").'">Administrator blog</a>';
?>


© «Bitrix24», 2001-2024
Up