4 Replies Latest reply: Jun 12, 2013 3:23 PM by revdave RSS

    Setting up mobile (responsive) pages

    revdave Community Member

      Hi all,

       

      I have a preexisting complex site up and running. Now, I would like to create a - "responsive" - cut down version for mobile phones and tablets.

       

      The main site is too complex to add mobile responsive design to - so I was thinking that it would be easiest to create a new "mobile directory" and use DW 's fluid grid layout for this directory contents. Then I could adapt some cut-down main site pages for this usage.

       

       

      Q: One thing I need to know is what bit of code would I put on the MAIN INDEX page - to check for phones and tablets and if detected then redirect to the mobile directory?

       

      Also - if anyone has any suggestions about this concept - I would love to hear them

        • 1. Re: Setting up mobile (responsive) pages
          osgood_ MVP

          You can detect for mobile devices using php mobile detect:

           

          http://code.google.com/p/php-mobile-detect/wiki/Mobile_Detect

           

          About the concept I would entirely agree. I haven't as yet delved deeply into respnsive design as I have not been asked to specifically make a site compatible with mobiles as it already is, albeit not optimised for mobiles which is what responsive design is. I design real world sites, not examples or tutorials, and most of the time they require a lot of page manipulation i.e. different columns for different pages, page specific css. I have a problem with responsive design when it comes to that, not that it can't be done but it adds yet another layer of complexity and time consumption and would take so long to manipulate the css that in my opinion in most cases its not financially viable.

           

          So you either have to start to compromise the design of the site by making the grid system simpler or you can do as you suggest and take the essential information of the 'main' site and make a seperate mobile friendly site, which is the angle I would most likely take if asked to make a site mobile friendly.

          • 2. Re: Setting up mobile (responsive) pages
            Nancy O. MVP

            If you're dynamically populating pages with content from a MySql database, you can create queries to target certain devices and designate which content they receive.   In my opinion, one site is far easier to manage than separate ones.

             

             

            Nancy O.

            • 3. Re: Setting up mobile (responsive) pages
              revdave Community Member

              Thanks

               

              You can detect for mobile devices using php mobile detect:

               

              http://code.google.com/p/php-mobile-detect/wiki/Mobile_Detect

               

              --- I took a look at this and it seem to use phone codes as part of it's detection...

               

              - I imagine this would require constant updates - right?

               

              - also could there be another more 'global' method - in which we just detect the current size of the screen - and handle navigation that way? If so what commands php (or?) would detect screen size?

              • 4. Re: Setting up mobile (responsive) pages
                revdave Community Member

                Thanks Nancy O. - that's a good idea if I was using DB queries - but not in this case...