We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2470
    • 1 Posts
    AvalancheDesigns Reply #1, 17 years ago
    Could someone please point me in the right direction?
    I think I’m looking for an add-on.
    Here’s what I’d like it to do:
    I’d like to click on a page called Hotels, Restaurants, ect. and on each of those pages would be a list of the local Hotels with contact info in alphabetical order.
    Thanks for your help in advance.
      • 4971
      • 964 Posts
      You need to create a folder document (i.e., Hotels page, Restaurents page, etc.) where you are going to show the list of establishments in any order that you want using a Ditto call (see the Ditto docs), Ditto accepts "mini" templates so you can show your info in any way you want.

      You also need to add individual document pages under the above folder document with the information of each of the establishments (i.e., one page for Hotel California, one for Sheraton, etc.) The info should probably be entered in each page using Template Variables.

      That is the basics for doing what you want...
        Website: www.mercologia.com
        MODX Revo Tutorials:  www.modxperience.com

        MODX Professional Partner
        • 9207 ☆ A M B ☆
        • 2,475 Posts
        It’s very simple to list PAGES that exist in an enclosing folder... many Snippets do this type of thing, e.g. Ditto and Wayfinder.

        If you can store your hotel information on a page, then you’re set... just create a page for each, list them using a Snippet, and you’re done.

        A page, however, has a limited number of fields... imagine a spreadsheet where you had columns for "title", "summary", "content" etc... If that doesn’t work for your storing your hotel data, you’d need to augment those "columns" -- the way MODx does that is via Template Variables (search the Wiki / forums for examples on how to use them). Using template variables is one way to have a "column" for "phone number" or "address" and give a uniformity to your hotel specific pages.