C
C
CatCotCod2020-08-18 21:14:54
1C-Bitrix
CatCotCod, 2020-08-18 21:14:54

Substitution of content depending on the site address, how to implement?

There are three urls. The site is essentially one, but divided into subdomains (regional, for example, spb.site.ru), the information is duplicated for all. There was a need to do the following, on the feedback page indicate contacts (mail, phone, etc. for the region taken), but the information is entered once and is the same for all three, how to replace information (mail, phone) for each address? Please tell

me Ps: cms Bitrix

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilia Malashko, 2020-08-19
@CatCotCod

Create a separate infoblock (IB) where all the unique information is listed /
Next, write a module that will find the required entry in the IB by domain (which can be taken from $_SERVER['HTTP_HOST']) and write it to an array or object, as you like.
After that, on the feedback page, connect this module and display unique contacts for a specific subdomain on the page.

V
Viktor Taran, 2020-08-19
@shambler81

EE cap and the documentation is not?
once
https://dev.1c-bitrix.ru/learning/course/?COURSE_I...
two times https://dev.1c-bitrix.ru/learning/course/
?COURSE_I...
And twisting the crutch does not make sense because there is an official, documented way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question