suncat2000 / MobileDetectBundle

Symfony 2/3/4 bundle for detect mobile devices, manage mobile view and redirect to the mobile and tablet version.
397 stars 153 forks source link

getCurrentView() or similar #129

Open Alymbek opened 5 years ago

Alymbek commented 5 years ago

Hi, dear @suncat2000.

can you add function like getCurrentView() or similar in php and twig? we can separate template type in folder(/full/base.html.twig, /mobile/base.html.twig, etc.).

and use it in php: return $this->render(getCurrentView() . '/base.html.twig');

for twig: {% extends getCurrentView()''.'/base.html.twig' %}