P
P
pasib2017-04-18 08:47:49
1C-Bitrix
pasib, 2017-04-18 08:47:49

How to get rid of duplicate sections in 1C-Bitrix?

I use the latest release 17 version of 1C-Bitrix.
For element pages, Bitrix allows you to set canonical links.
However, there are duplicate section pages, how to set a canonical link for them
(how to set the rel="canonical" attribute)?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Viktor Taran, 2017-04-18
@shambler81

I just did
1. closed all filters and paging under ajax
2. rial canonical not on sections but everywhere where there is a get request for a page without it.
Well, to get rid of duplicate sections of multiple binding of goods by properties.
then you just
put the goods in 1 infoblock
and knit the properties like a tree of sections.
In this case, the product url will always be the same. /catalog/item1
although before that they came to it via the links
/holodilnik/krasniy
/russian/holodilnik/big
Well, work with robots .txt

P
pasib, 2017-04-18
@pasib

Victor, you give an example of the same product in different sections.
And in my case, the section is the same, only the addresses differ in capital / lowercase letters. For example:
sibl.ru/catalog/Cypress-kommutatoryi.html
sibl.ru/catalog/cypress-kommutatoryi.html

A
Alexey Burlaka, 2017-04-19
@AlexeyGfi

As far as I understand, it will be a manual instruction.
I would:
1. Create a custom property for the section, string. For example UF_CANONICAL_TO .
2. I registered the address of the canonical page in this property for those sections that need to be “glued together”.
3. In the component template (in its folder, I mean), I created component_epilog.php (so that the cache does not interrupt me adding a line) and checked there: if the property is set, I wrote the canonical.
[+]
[+]
To "throw" arResult -parameters in component_epilog :
create result_modifier.php in the component template and inside the code:

$cp = $this->__component; // объект компонента

if (is_object($cp)) {
    $cp->SetResultCacheKeys( array_keys( $arResult ) );
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question