I
I
IgorRastarov2018-03-27 10:18:46
1C-Bitrix
IgorRastarov, 2018-03-27 10:18:46

How to change SEO - data depending on the city?

Hi all. I have a domain and 2 subdomains. Tell me how to organize this feature.
https://monosnap.com/file/U3p4AuwWTzAk74NaSXTqEvFF...
Is this special module worth it? Or can you do it yourself too?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrey Nikolaev, 2018-03-27
@IgorRastarov

This is a very interesting task.
Like Nikita , we declared the #CITY_NAME# marker (well, we didn’t directly declare it, but we agreed that this value should be changed to the name of the user’s city in the nominative case).
Further, the texts of all the necessary parts were changed. Then, on the OnEpilog event, we replaced this marker with a city.
For deferred functions (eg CMain::SetTitle )
following the page execution order on the same event override their values.
Well, of course, you should not forget about the administrative panel: deferred functions also work for them, so we rejoice at the ADMIN_SECTION constant , which is true in the admin panel.

N
Nikita, 2018-03-27
@Rema1ns

Most likely, the value of the title is obtained through a deferred function, possibly in the header or footer, then they look for ##CITY_NAME## in the line and replace it with the current city. Approximately so it is implemented.

V
Viktor Taran, 2018-03-27
@shambler81

Unfortunately, multisite in principle does not support s1 s2 and so on, as a result of which the module is configured for all sites at once. The Bitrix forum says how you can customize this place and set the condition with a code, unfortunately at the last conference I talked with Alexey and he said that I understood the idea, but it won’t be possible to fix it because you have to redo the database structure, and this is a long question, and everything can be done in in the form of a code, however, he admitted that SEOs will not be able to write this code. So you collect a number of requirements of what and where should be, and give it to the developer, the forum has a detailed description of how this can be done. the developer will do it quickly enough, but it is better to immediately give him all the points where he should do it. No deferred functions are needed for this, the code is inserted directly into these fields

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question