Symfony 2 load different template depending on user agent properties

后端 未结 8 1422
时光取名叫无心
时光取名叫无心 2020-12-02 17:28

Is it possible (and how) to

  • determine if a user is using a mobile device
  • force symfony 2 to load different template in that case
  • <
8条回答
  •  借酒劲吻你
    2020-12-02 17:47

    I think is nothing to do with symfony. Templates are for the VIEW. You may achieve this by using different CSS for the same template to get different layout (template). I am using jQuery and CSS to handle different devices. You may want to look at some source code of the UI from http://themeforest.net/; specifically this template. This is one handles different device.

提交回复
热议问题