We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4749
    • 623 Posts
    Hello,
    I’m very new to ModX, but very enthusiastic about the possibilities. I’m creating a Property Management site similar to a Real Estate site. I’ve created the template for a detailed property view, but I’d like to take the data for the detailed view and create a summary listing. I want all the properties to show up on one page with a small image and 5 tv’s. I’ve never used Ditto before and read through the documentation, but I’m not sure how to proceed. I set up the ditto template as a chunk, but I’m kind of stuck. Also, I’m not sure how to structure the site. Do I have the summary page be the container for all the detailed property pages? Please help! Thank you.

    cbaone
      The MODx has you...
      Utah Web Design
      • 18397
      • 3,250 Posts
      The simplest method would be just like you describe, having the summary page be the container for all the detailed property pages. To show TVs in a Ditto 2 template, just reference them like any other document object. So if description’s is [+description+], then the TV myTV would be [+myTV+]. To show all child documents, make sure you set &display=`all`.
        • 4749
        • 623 Posts
        Alright! Thanks for the quick and helpful reply. I was on that track, but still working it out. But, to clarify, on the summaries page (where a tiny summary of the properties are) is that the parent of all the detailed descriptions of the properties? Like this:

        +HOME
        +PROPERTIES
        -Property 1
        -Property 2
        -Property 3
        -Property 4

        +ABOUT US
        +CONTACT US

        Does the properties page become the parent? OH, also, one other question - can ditto call images too? And how do I reference that? Sorry to be so needy. I’ve been trying to do this on my own so I wouldn’t have to bother anyone, but the forums have been great. Thanks again.

        Dan
          The MODx has you...
          Utah Web Design
          • 18397
          • 3,250 Posts
          Yes, the summaries page would be the PROPERTIES page in your example above. Ditto can call image TV’s as well (remember, the TV returns the image URL, not its tag unless you turn on a display widget). Or, if you name you images consistently, say by the id of the page, you can just use:
          <img src="path/to/your/image_[+id+].jpg" title="Pic of [+pagetitle+]" />
          
            • 4749
            • 623 Posts
            Wow, very cool! I’m almost there!

            Thank you so much for your help. I was pretty much there, but I needed someone to just give me clarification and you cleared it right up! Awesome! I’m so excited about ModX I can hardly stand it. I can now make a very high-quality, dynamic website without any PHP knowledge - AMAZING!

            Mark, you rule!
              The MODx has you...
              Utah Web Design
              • 4749
              • 623 Posts
              Mark,
              One last thing - can I make that image linkable? The one I’m calling with ditto, can it be attached to a url leading to the detailed property description?
                The MODx has you...
                Utah Web Design
                • 4749
                • 623 Posts
                Sorry Mark,
                I hate to keep asking you things, but I’m getting some "extra" properties that are showing up on the summaries page. I’ve got everything working the way I wanted it to except those extra summaries. Any ideas?

                Again thank you so much for all your help. I REALLY appreciate it.

                Dan
                  The MODx has you...
                  Utah Web Design
                  • 4749
                  • 623 Posts
                  OK Mark,
                  I figured it out. I just needed to dive in and figure it out. Thanks to you it was a lot easier than I anticipated it to be. I appreciate your time and prompt responses.

                  Have a great weekend.

                  Dan grin
                    The MODx has you...
                    Utah Web Design