We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30912
    • 463 Posts
    We have had a tender come through where one of the requirements is the website is requried to be viewable on Mobiles.

    I have had no previous experience with the Mobile web world and im wondering if Modx is capable of accomodating it.
      • 25483
      • 741 Posts
      modx is capable of that, the easiest way to do it is by using a stylesheet for mobile devices. Then your visitors mobile uses the style that is made for a mobile.

      You could also setup some directory’s, 1 with your normal site and 1 with your mobile specific pages. But the best is to go with the special stylesheet for a mobile.
        with regards,

        Ronald Lokers
        'Front-end developer' @ h2o Media

        • 30912
        • 463 Posts
        Thanks for the reply, is it easy to make Modx recognise the site is being viewed on a mobile?
          • 25483
          • 741 Posts
          It’s not modx related, it’s just your css.

          You can just add a css call to your html page:
          <link href="mobile.css" rel="stylesheet" type="text/css" media="handheld" />


          Your normal css should be called like this:
          <link href="standard.css" rel="stylesheet" type="text/css" media="screen" />
            with regards,

            Ronald Lokers
            'Front-end developer' @ h2o Media

            • 30912
            • 463 Posts
            Many thanks
              • 30585
              • 833 Posts
              Just to add some more to this.

              You also have to keep the handheld’s browsing capability in mind. If you’re using big graphics on your default site, you might want to design a smaller version of the site and limit the use of graphics as they require more download time. Unless the user has an unlimited data plan, downloading a 56k jpg image over and over will translate itself into a salty bill.

              If you choose to build a light version of the site just for mobile devices, you might need a browser detection script on your home page to redirect the user should they attempt to access it directly.

              Good luck
                A MODx Fanatic
                • 25483
                • 741 Posts
                Quote from: treigh at Mar 15, 2009, 09:00 AM

                Just to add some more to this.

                You also have to keep the handheld’s browsing capability in mind. If you’re using big graphics on your default site, you might want to design a smaller version of the site and limit the use of graphics as they require more download time. Unless the user has an unlimited data plan, downloading a 56k jpg image over and over will translate itself into a salty bill.

                If you choose to build a light version of the site just for mobile devices, you might need a browser detection script on your home page to redirect the user should they attempt to access it directly.

                Good luck

                You could also create a modx plugin that detects if you are browsing on a mobile and than based on that output a smaller version of your images by using phpthumb to regenerate the images.
                  with regards,

                  Ronald Lokers
                  'Front-end developer' @ h2o Media

                  • 30912
                  • 463 Posts
                  I would have no idea how to do that ^_^
                    • 20413
                    • 2,877 Posts
                      @hawproductions | http://mrhaw.com/

                      Infograph: MODX Advanced Install in 7 steps:
                      http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                      Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                      http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
                      • 9995
                      • 1,613 Posts
                      this is code for redirecting when you have iphone or ipod:

                      <?php
                      if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') !== FALSE || strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') !== FALSE) {
                      header("Location: /mobile/"); }


                      put it in a snippet and call the snippet in your template
                      on iphone/ipod u can use a different website located on site.com/mobile/
                        Evolution user, I like the back-end speed and simplicity smiley