Answer the question
In order to leave comments, you need to log in
How to add page number to pagination page meta tag?
The site implemented pagination in the catalog. The title is rendered through a standard component.
The template displays as follows:
How to add a condition under which a page like www.site.ru/catalog/?PAGEN_1=2 will have "Page 2" in the Title? <title>
$APPLICATION->ShowTitle() </title>
Answer the question
In order to leave comments, you need to log in
I haven't written in php for a long time, but it seems like this
<title><?
$APPLICATION->ShowTitle();
if (isset($_GET["PAGEN_1"]) and is_int($_GET["PAGEN_1"]))
{
echo "Страница ".$_GET["PAGEN_1"];
}
?></title>
How I would do it:
The text “ Page ” should be correctly moved to /lang/ files and then the call to the previous line will be like this:
$APPLICATION->SetPageProperty(
'pagination_suffix',
\Bitrix\Main\Localization\Loc::getMessage( 'PAGE_IN_BROWSER_TITLE' ) . 'zZz'
);
arResult
in component_epilog.php, you need to write in result_modifier.php :$this->setFrameMode(true);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question