We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2878
    • 81 Posts
    I’ve tried searching but nothing close shows up.

    Each member has a page with 11 details about themselves.
    I want their Name, Business Name, and URL (just these 3) to go to another page and populate
    that page decending in alpabetical order. With their Name linking back to the page with their 11 entires on and the URL to link out to the website. Can I put commands/code in thr Resource Content area to do this? If so an idea of how and what to apply would be greatly appreciated.

    Thank you,
    bauhaus9
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      The best way to do that would be to make those items TVs, then use a custom Ditto tpl to display those TVs.
        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
        • 2878
        • 81 Posts
        Quote from: sottwell at Jul 15, 2010, 06:17 AM

        The best way to do that would be to make those items TVs, then use a custom Ditto tpl to display those TVs.

        I’ve looked over several tutorials and I’ve added the TV’s name and name link, Business Name and website and web url but I can figure out the ditto string that I would place in the main page to list out the TV’s??? Think I’ve hit the wall!!!

        Thanks,
        bauahaus9


          • 29019 ☆ A M B ☆
          • 104 Posts
          Lets say all of your members are under a page with id 42. To show all of them you’d first make a chunk that looked something like this:

          <dl class="member">
          <dt>Name</dt><dd>[+name+]</dd>
          <dt>Business Name</dt><dd>[+business-name+]</dd>
          ...
          </dl>


          Then in the template or page you’d like them all to show up, you’d put your Ditto call which would look something like this:

          [[Ditto?&startID=`42`&tpl=`your-new-chunk`]]


          Obviously your chunk might look a bit different depending on how you’d format your members, but that should get you started.
            www.darkstardesign.com

            Are you in the Nashville area? Join us for our next MODX meetup!
            • 2878
            • 81 Posts
            Quote from: swespi at Jul 15, 2010, 08:11 PM

            Lets say all of your members are under a page with id 42. To show all of them you’d first make a chunk that looked something like this:

            <dl class="member">
            <dt>Name</dt><dd>[+name+]</dd>
            <dt>Business Name</dt><dd>[+business-name+]</dd>
            ...
            </dl>


            Then in the template or page you’d like them all to show up, you’d put your Ditto call which would look something like this:

            [[Ditto?&startID=`42`&tpl=`your-new-chunk`]]


            Obviously your chunk might look a bit different depending on how you’d format your members, but that should get you started.

            How do I send the TV information to the chunk that is being displayed by ditto?

            Here is the Chunk >
            <div class="ContentHolder">   
            <div class="SC_title03"><h3><a href="[~[*id*]~]">[*membersname*]</a></h3></div>  
            </div>


            Sorry bu the chunk TV thing is still Fuzzy...
            Thank you.
            bauhaus9
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              If you have a TV named "membersname", then Ditto will automatically put its value in the [+membersname+] placeholder.

              The trick to Ditto (and any other snippet) tpls is to actually write the HTML for exactly what you want each item to look like. Then replace the content from the resource with the appropriate placeholders. The tpl gets applied to each resource, with its values for the placeholder’s name inserted where the placeholder is.

              Thus [+pagetitle+] will be replaced with each resource’s page title in turn; likewise any TVs you want to use.

              Usually in the case of dealing with people, whether it’s members or employees or anything else like that, the page title will be the person’s name, so in the Ditto tpl I would use [+pagetitle+] where I want the person’s name to appear. The only time I would use a TV would be if the resource is actually about something else, for example a song, then I would have a TV for the performer’s name.
                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
                • 2878
                • 81 Posts
                Thank you all so much for the help.

                I have figured out how to add TV’s, use them with a CHUNK and add the CHUNK’s listing with Ditto to go into a resource page. With each of my listings on the resource page linking back to the members full information page. Viva MODx!!!

                bauhaus9

                Now to tackle eForm setup....
                I’m sure you will be hearing from me soon.
                Have a great Friday!!!