how to make multi version in codeigniter for mobile and desktop |
11-11-2017, 12:37 PM
(This post was last modified: 11-11-2017, 12:43 PM by PaulD. Edit Reason: Added link )
I think the docs are pretty clear on this.
https://www.codeigniter.com/user_guide/l...:is_mobile In essence, you test to see if it is a mobile device, and if it is, load a specific view, or if not, load a different view. If you just load views in your controller, you might do something like the example given in the docs and load different views. If you keep your different views in different sub folders, you could use the if statement to set the folder name and use that variable in your view call. You might need some checks to see if the view exists or not as well. Alternatively, if you have created a template library of some sort, you would only have to do the mobile check once in your template library, also very easy to modify rather than changing all your controllers. If you show a sample of how you load your views we might be able to offer a bit more specific advice. As with everything CI, how you actually use the tools provided varies on how you have decided to implement your website. Paul More info here: https://stackoverflow.com/questions/6209...odeigniter Or here: https://digitizor.com/codeigniter-mobile-browser/ And lots more on Bing |
Messages In This Thread |
how to make multi version in codeigniter for mobile and desktop - by edram - 11-11-2017, 10:53 AM
RE: how to make multi version in codeigniter for mobile and desktop - by PaulD - 11-11-2017, 12:37 PM
RE: how to make multi version in codeigniter for mobile and desktop - by edram - 11-12-2017, 02:35 AM
RE: how to make multi version in codeigniter for mobile and desktop - by scalla - 11-12-2017, 12:43 PM
|