We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18367
    • 834 Posts
    I'm trying to figure out how to set up Revo templates for mobile phones.

    I've looked at both modMobile and mobile Detection, but the instructions are a little terse.

    All I really want to do is remove certain parts of the main template for mobile viewing.

    I don't need a new css just a different template or the existing template marked up accordingly.

    mobile Detection seems like it might do this, but from the instructions it looks like I have to duplicate everything first.

    Anyone had any success with either of these extras and know how to do this?

    Thanks
      Content Creator and Copywriter
      • 30585
      • 833 Posts
      Are your template responsive? If yes, then no need for a special script or snippet.
      Otherwise you could create a snippet based on a third party mobile detection script (php preferably). There are tons of those online. Just Google it. You would then need something like the If snippet to serve your pages to the appropriate medium.
        A MODx Fanatic
        • 22840
        • 1,572 Posts
        All I really want to do is remove certain parts of the main template for mobile viewing.

        If it's just to hide things try using Media Queries http://css-tricks.com/snippets/css/media-queries-for-standard-devices/
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Sometimes it's not such a good idea to simply hide stuff for mobile platforms, since the user still has to download whatever it is you don't want to show on the small screen. That's why the latest design paradigm appears to be to start with designing the site for the small platform then work up to the laptops and PCs.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 18367
            • 834 Posts
            @Triegh,

            they are responsive to a point. That is they resize based on screen size. I did a search like you said and didn't really find anything.At least not anything that made any sense to me.

            In any event, I thought that's what the Revo extras modmobile and mobiledetection were supposed to do.

            @Susan,
            yes came across this http://mobile.smashingmagazine.com/2013/03/05/building-a-better-responsive-website/ but it seems to be indicating that I'll need to build a completely new template and stylesheet. I was really hoping to avoid that. For the moment I just need a stop gap solution until I can build new templates and css.

            @Paul,

            thanks for that. It adds to what the Smashing Mag article covers.

              Content Creator and Copywriter
              • 38290
              • 712 Posts
              Short answer, dont. If a feature isn't relevant on a smaller touch device, why is it elsewhere?

              I guess I'll get known as the guy pushing Mobile First and Responsive CSS. It's become pretty tried and true and should always be considered.
              http://www.abookapart.com/products/mobile-first

              I get the "my clients want it this way" response a lot. I think how you respond to that depends on whether you are working as a production coder, or a site builder. Production coders do what is requested, site builders make sure things don't get developed that shouldn't be the first place. A web page serves a given purpose be it on a mobile device or a desktop. Is the reason the user visits the page always different depending on the device being used?

              Just be really sure serving device dependent web functionality is necessary as it can leave you with a desktop experience with too many features and a mobile one with too few.

                jpdevries
                • 18373 ☆ A M B ☆
                • 3,141 Posts
                I would personally recommend using media queries over modmobile / mobile detection - in my (limited) experience with those mobile detection addons they are quite costly in terms of performance due to parsing stuff on the fly. A simple media query would be much easier and probably faster.

                That said, Susan's argument of it still being downloaded stands, so it does depend on what you're hiding.
                  Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                  Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                  • 10378
                  • 375 Posts
                  Quote from: markh at Apr 27, 2013, 06:09 AM
                  I would personally recommend using media queries over modmobile / mobile detection - in my (limited) experience with those mobile detection addons they are quite costly in terms of performance due to parsing stuff on the fly. A simple media query would be much easier and probably faster.

                  That said, Susan's argument of it still being downloaded stands, so it does depend on what you're hiding.

                  If you build your site (or parts of it) under the "mobile first" paradigm, the mobile device doesn't have to download unwanted parts.
                    Freelancer @bitego http://www.bitego.com
                    ---
                    GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
                    More infos here: http://www.bitego.com/extras/goodnews/
                    • 18373 ☆ A M B ☆
                    • 3,141 Posts
                    True, but MarkG seems to be dealing with an existing template and it's a bit late to start Mobile First then! smiley
                      Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                      Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                      • 38290
                      • 712 Posts
                      I think when you find yourself dealing with the problem of an existing template, not being able to do mobile first...do nothing or redesign. Is you traffic predominately mobile?

                      Yes? Redesign.
                      No? Then who cares. Look at apple.com.

                      A site's need to cater to mobile should either be important enough for responsive design, or not. Never both [ed. note: dinocorn last edited this post 13 years, 5 months ago.]
                        jpdevries