We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39583
    • 103 Posts
    On my site www.example.com I'm using babel for my two languages which gives me www.example.com & www.example.com/fr/.
    My client also wants a mobile version of the site which should have the address: www.example.com/webapp & www.example.com/fr/webapp

    I was thinking I have to recreate all the docs under a doc called "webapp" to still keep the FURLs the same way but with webapp in the address first. All the content is the same, the menus are the same, its just the layout that should be different.

    So would it be possible to make one document have two templates and use "webapp" in the address to view the correct one?
    If not does anyone else have a good suggestion of how I can use webapp in the address like shown above without doing a lot of work?
      --
      André
      • 36502 ☆ A M B ☆
      • 491 Posts
      if the content is the same you could try some css3 trick to include a different css and make the site "responsive", for example:

      <link rel="stylesheet" href="/layout-mobile-port.css" type="text/css" media="only screen and (max-width:479px)"  />


      Otherwise you may give a look at some extras, like:

      http://rtfm.modx.com/display/ADDON/modMobile





        TilliLab | MODX Ambassador
        website
        • 10208 ☆ A M B ☆
        • 1,780 Posts
        You could try to upsell a responsive design instead of having a completely different "site" in a webapp folder. By the time you redesign for responsive (percentage based) for the webapp view, your main site would remain un-responsive and you'll still have to update twice any time you change a page unless you implement some fancy fetching of resources that I wouldn't want to even dig into messing with. Blech!

        In most cases, modifying the current site to responsive would be about as much work and duplicating it and making one responsive while the other remained fixed, if not more work actually. Your client doesn't need to know that, exactly.

        The problem with plunking an existing site in with a mobile media query without modifying your existing fixed width divs means that while the site itself would degrade to mobile widths, your content won't react properly to the new mobile width and will look icky. Once you modify the divs for responsive, you may as well use them globally. No need for a subfolder webapp site at that point.
          Frogabog- MODX Websites in Portland Oregon
          "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
          Having server issues? These guys have MODX Hosting perfected - SkyToaster
          • 37099
          • 338 Posts
          Another vote for making the existing site responsive.

          I agree with what's already been said and would add that having pages with duplicate content may effect search engine rankings: Google duplicate content
            • 39583
            • 103 Posts
            Quote from: tillilab at Jan 07, 2013, 10:29 AM
            if the content is the same you could try some css3 trick to include a different css and make the site "responsive", for example:

            <link rel="stylesheet" href="/layout-mobile-port.css" type="text/css" media="only screen and (max-width:479px)">


            Otherwise you may give a look at some extras, like:

            http://rtfm.modx.com/display/ADDON/modMobile


            To tillilab and frogabog,
            Thanks for your replies. The second option looks good. But do you know if there is a way to add the "webapp" part to the address? Then is would be a good solution! =)

            My client wants that specific address for the mobile version of the site. A responsive design was my aim first but its not what they want. modMobile looks like it would do the trick and if its somehow possible to add webapp to the address easily without duplication all documents would be great.
              --
              André
              • 10208 ☆ A M B ☆
              • 1,780 Posts
              Maybe you can redirect to a container resource called webapp and apply the modMobile to all child resources. Then use getResources to fetch all your current resources (except the webapp container).

              I dunno, sounds like someone dropped the phrase mysite.com/webapp at some dinner party and the client now has tunnel vision. Sounds complicated and bad for SEO if you can't do something similar to the above concept. I suppose you'll make more cashola that way though, as long as you're charging by the hour.
                Frogabog- MODX Websites in Portland Oregon
                "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                Having server issues? These guys have MODX Hosting perfected - SkyToaster
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Indeed. It won't be long until "mobile" versions go the way of table-based layout. It will simply be expected that sites will adapt to the device.

                Just yesterday I was in a meeting with a client, and in about two minutes they fell in love with the idea of a responsive conversion of their existing template. It was amusing watching these guys laughing and exclaiming as they re-sized their browsers back and forth. [ed. note: sottwell last edited this post 13 years, 9 months ago.]
                  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
                  • 10208 ☆ A M B ☆
                  • 1,780 Posts
                  Unless the webapp is actually a mobile app with dramatically different functionality (i.e. order from menu on the go, disregarding the actual site), IMO there's no reason to have a mobile app. It also severely limits your exposure on mobile devices, these mobile apps. Not much is as frustrating as wanting to view a website, but only being allowed to use the "mobile app" if all you have on hand is your phone. I exit more often than not if I encounter such a thing.
                    Frogabog- MODX Websites in Portland Oregon
                    "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                    Having server issues? These guys have MODX Hosting perfected - SkyToaster
                    • 10208 ☆ A M B ☆
                    • 1,780 Posts
                    Quote from: sottwell at Jan 07, 2013, 11:49 AM
                    Indeed. It won't be long until "mobile" versions go the way of table-based layout. It will simply be expected that sites will adapt to the device.

                    Just yesterday I was in a meeting with a client, and in about two minutes they fell in love with the idea of a responsive conversion of their existing template. It was amusing watching these guys laughing and exclaiming as they re-sized their browsers back and forth.

                    People seem to love seeing the site re-arrange itself. It is very cool to watch. Even without considering the benefits of not having to duplicate all site edits, the magic seems to sell itself.
                      Frogabog- MODX Websites in Portland Oregon
                      "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                      Having server issues? These guys have MODX Hosting perfected - SkyToaster
                      • 39583
                      • 103 Posts
                      Quote from: frogabog at Jan 07, 2013, 12:03 PM
                      Unless the webapp is actually a mobile app with dramatically different functionality (i.e. order from menu on the go, disregarding the actual site), IMO there's no reason to have a mobile app. It also severely limits your exposure on mobile devices, these mobile apps. Not much is as frustrating as wanting to view a website, but only being allowed to use the "mobile app" if all you have on hand is your phone. I exit more often than not if I encounter such a thing.

                      Agreed! This part of the page should function as both a mobile web page and a mobile webapp for both android and iphone! I wish I could convince everyone that native apps are better! (For now) But yes, I think someone just dropped it at meeting!
                      I like your idea of "redirect to a container resource called webapp and apply the modMobile to all child resources". I will give it a try!
                        --
                        André