We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48646
    • 9 Posts
    davidinottawa Reply #1, 12 years ago
    Hi group - Very new to MODx.

    I have found the MODx experience to be very quick and easy to set up a basic brochure site. So far so good - and so happy to ghet away from Wordpress!

    I'd like to create a single page website but not sure how to go about this in MODx.
    Similar to this for example : http://fastrackconsulting.com/
    I've thought about a couple of ways to accomplish this in MODx, but none seem very elegant. I thought I could use a Template Variable - but it seems as tho it would be convoluted to the client.

    Can someone please provide some advices, and/or example of how they used MODx to create a single page website ?

    Thanks! dave

    This question has been answered by AMDbuilder. See the first response.

    [ed. note: davidinottawa last edited this post 12 years ago.]
    • discuss.answer
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      I've done single page sites in the past using two different methods:

      a) Create each section as a normal page, adjusting your pdoMenu/Wayfinder call to output a single page menu. I then use pdoResources/getResources to bring those subpages into the main single page.

      b) It took a little extra work, but I was also able to use Content Blocks to power a single page site. The menu was generated using pdoTools along with weblinks, but could alternatively be done manually.

      Ultimately, the best choice will depend on your client and what method works best for them. The first method is a little easier to setup, with the second method being more an exercise in possibility/practicality. If there was a method to output a menu based on the layouts used on the page in question it would have been easier to accomplish.
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        It shouldn't be too difficult to parse a single resource's content and pick out the section headings to build a menu out of.

        However, I have found that the bigger the resource content is, the more likelihood of somebody messing up the whole page. Using separate resources for each section and building the page with pdoResources or something similar is much easier for clients to keep updated without breaking the whole page.
          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
          • 42046
          • 436 Posts
          Basically, I use parent/child resources as standard for creating content (easier for content editors to update sections), use pdoResources to pull content into a single page structure, use pdoMenu to create the page nav along with pdoTools fast field to pull the alias of parents/children to use as the div hash for single page navigation.
            • 1343 ☆ A M B ☆
            • 2,213 Posts
            You shouldn't need to use fastfield, but otherwise correct.
              Patrick | Server Wrangler
              About Me: Website | Tweets |  MODX Hosting
              • 48646
              • 9 Posts
              davidinottawa Reply #6, 12 years ago
              Thanks for all the help on this issue.
              pdoResources looks like a great solution.