A
A
alexander_chn2018-03-27 14:26:42
1C-Bitrix
alexander_chn, 2018-03-27 14:26:42

How to make a mobile template in Bitrix?

Hello! I can't understand one thing. The situation is as follows: there is a site on Bitrix, for example: site.ru and there is a mobile subdomain m.site.ru. How to make sure that when you go to m.site.ru, the mobile site template and all products and content from the main site site.ru are loaded?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikita, 2018-03-27
@Rema1ns

You can throw the subdomain as a variable in $_REQUEST, let's call it mobile, then in the site settings in the template column we add a condition, preferably 1 point for
the "no" place - your mobile template

I
I'm Yoda, 2018-03-27
@Anadi

I did the following on one of the projects:
1. I took Mobile Detect from github .
2. On the main site, I did a check for the device, if the mobile phone loaded the mobile template.
In your case, you need to redirect to m.site.ru, in the Bitrix settings you need to specify the site addresses (if you have a multi-site).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question