We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3689
    • 264 Posts
    I’m going to be putting up a page and 1 of the pages I have is a "projects" page (site.com/projects).. I was wondering when I create a subpage under the "projects" page which would be site.com/projects/project01 is there a way to have an image and title of the project dynamically added to the site.com/projects page?

    Would I be able to upload/resize/crop the image that appears on site.com/projects?

    I’m also interested in having an image gallery on the site.com/projects/project01 page.. would that be another addon or would I do that with ditto?
      • 4749
      • 623 Posts
      Yep! Ditto is definitely your answer. If you’re anything like me you’ll need to do a lot of research first. Ditto is kind of difficult at first to grasp, but it is very powerful and flexible. I would start in the ditto section of the forums and see if anyone has done something similar and use it as a starting out point. But, in the end, with ModX, "there’s more than one way to skin a cat" - good luck.
        The MODx has you...
        Utah Web Design
        • 3689
        • 264 Posts
        Quote from: cbaone at Sep 18, 2009, 05:05 PM

        Yep! Ditto is definitely your answer. If you’re anything like me you’ll need to do a lot of research first. Ditto is kind of difficult at first to grasp, but it is very powerful and flexible. I would start in the ditto section of the forums and see if anyone has done something similar and use it as a starting out point. But, in the end, with ModX, "there’s more than one way to skin a cat" - good luck.

        Thx for the reply! I remember your name from the main modxcms.com page so I figured you would have alot of information in your posts and it seems you do smiley Ill be going through alot of the forum posts and yours and see how I do. And nice website!
          • 15175
          • 116 Posts
          I’ve done pretty much want you want to do here.

          All the information is contained in the individual project pages, and ditto pulls in and displays the info for the portfolio page. The portfolio thumbnails are resized dynamically from the main images by the phpThumb package.



            • 3689
            • 264 Posts
            Quote from: j_p at Sep 18, 2009, 06:11 PM

            I’ve done pretty much want you want to do here.

            All the information is contained in the individual project pages, and ditto pulls in and displays the info for the portfolio page. The portfolio thumbnails are resized dynamically from the main images by the phpThumb package.

            That is exactly what im looking for! how long did that take to do?


              • 15175
              • 116 Posts
              It took quite a while as I was trying out new things - I didn’t really keep track of the hours as I was working on it sporadically in my spare time.

              It maybe worthwhile checking out this site regarding Ditto:

              http://www.pogwatch.com/ditto.html

              smiley
                • 3689
                • 264 Posts
                Quote from: j_p at Sep 18, 2009, 06:33 PM

                It took quite a while as I was trying out new things - I didn’t really keep track of the hours as I was working on it sporadically in my spare time.

                It maybe worthwhile checking out this site regarding Ditto:

                http://www.pogwatch.com/ditto.html

                smiley
                I want to make sure I’m thinking the right way b4 I dont want to head in the wrong direction.

                I would be placing ditto on my "projects" page and then I would have to find a way to generate the Project Image (phpThumb) and Title from the child pages.. Do I need to place [[Ditto]] on the child page to pass it to the parent? or does the project page just grab the info from the child page?
                  • 15175
                  • 116 Posts
                  Yep, you just place the Ditto call in the content area of the document (or template) where you want the data aggregated.

                  This is my Ditto call within a list, for example:

                  <ul id="portfolio-items">
                     [!Ditto? &tpl=`ditto-portfolio-tpl`!]
                  </ul>
                  


                  The &tpl is the chunk of HTML used to display the <li>’s - in this chunk are placeholders that correspond to the document or template variables you want to display.

                  Ditto will grab data from the immediate children by default - it could come from anywhere if you wanted though.

                    • 3689
                    • 264 Posts
                    Quote from: j_p at Sep 18, 2009, 07:16 PM

                    Yep, you just place the Ditto call in the content area of the document (or template) where you want the data aggregated.

                    This is my Ditto call within a list, for example:

                    <ul id="portfolio-items">
                       [!Ditto? &tpl=`ditto-portfolio-tpl`!]
                    </ul>
                    


                    The &tpl is the chunk of HTML used to display the <li>’s - in this chunk are placeholders that correspond to the document or template variables you want to display.

                    Ditto will grab data from the immediate children by default - it could come from anywhere if you wanted though.




                    How do I tell it what to grab though? I’ve been reading through some posts and I seeing alot about TVs.. so if I were to create a page under Projects, do I place the TVs in there? like [+title+] or [+img+] and Ditto would get the information from those?

                    and thx for all the help!
                      • 15175
                      • 116 Posts
                      Yep, for example you could create TV called [*project-title*] and assign it to the template the parent document is using.

                      Then in the parent document’s content area:

                      <ul>
                         [!Ditto? &tpl=`ditto-tpl`!]
                      </ul>
                      


                      The ditto-tpl chunk:

                      <li>[+project-title+]</li>



                      Ditto would go through all the child documents and display all the project titles in a list.