We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36533
    • 65 Posts
    Quote from: chrisandy at Sep 05, 2013, 03:50 PM
    Have you considered using Foundation by Zurb? - fits with MODX like a glove and I found it had a relatively short learning curve.

    http://foundation.zurb.com


    He has a specific requirement not to use a responsive layout. Nice resource here though.
      • 36582
      • 463 Posts
      Quote from: nuwebstudios at Sep 05, 2013, 04:13 PM


      He has a specific requirement not to use a responsive layout. Nice resource here though.

      Yes I can see that now having read further but I wonder of the OP has a full understanding of what is possible using something like Foundation?

      The logic used so far seems to be going round in circles: Can't use Mobile detection because of this and can't use responsive layout because of something else?

      The way I see it mobile detection simply doesn't come into it and is not going to be future proof. Just my humble opinion.
        Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
        • 44976
        • 6 Posts
        Quote from: kudykam at Sep 05, 2013, 12:57 PM

        ...
        - gets content and tvs from specified resource (for example site.com/category/product123)
        - detect /mobile/ in url (site.com/mobile/category/product123) and show this resource with different template
        - all this without need to recreate duplicate product resource in /mobile/ folder

        Hmm... assuming your requirements this seems like a basic multi-site Modx with shared content approach:
        This can be done and would cache well (as cache is something you've indicated as a priority).

        You could build two separate sites that both grab content from the same location (ex: the content of each resource says to pull from an optional* third set of resources- including productId or whatever).

        You could write a short snippet translating from a given mobile or desktop URL to which resource contains your data. [*: mobile could reference desktop data leaving desktop site alone].
        - You would explicitly pull the content from the other resource maintaining complete control of what is displayed in the mobile version. (Probably code this in the template for the bulk of your pages).
        - You could simply create separate mobile pages with their own data as desired. (Separate "simpler" template that avoid above alternate resource data call).

        In my view, there is not going to be a simplistic** transparent way (hope that is not your goal) to continue writing code that assumes the current resource has the data (at least for one of the sites/sets). But it will be no more difficult in the end if you structure a solution that is clean and consistent- just some slightly different calls. Again, basically multi-site Modx with shared content.

        ** KISS principle properly applied: Keep it simple s
        ** KISS principle over applied: Keep it stupid s smiley
          • 39404
          • 175 Posts
          stalemate resolution associate Reply #24, 10 years, 8 months ago
          What about using a Symlink?

          http://rtfm.modx.com/revolution/2.x/making-sites-with-modx/structuring-your-site/resources/symlink/using-resource-symlinks

          That way, the OP could still keep the original site as is, and then use another template for a mobile optimized site.

          Another thought is to go Mobile First / Responsive Web Design on the mobile while keeping the desktop version intact. Then the next time they want to redo their site, make changes to the "mobile" version, and then repoint the existing desktop to the mobile.
            • 44976
            • 6 Posts
            Quote from: stalemate at Sep 08, 2013, 03:07 AM
            What about using a Symlink?
            Could be the most-simple-effective base approach. And it does not preclude specific other options as needed. Does give a different URL but that seems to be OP's preference.

            Watch for the class_key not matching the type in the database. Can cause problems with links etc. [Should have reported it but have not done so- have not checked new version.]
            • discuss.answer
              • 16430
              • 217 Posts
              Problem with duplicating resource solved by creating a new page with mobile tempalte and snippet getUrlParam and GetResources and calling correct resource via url e.g. resources?id=321