We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28676
    • 136 Posts
    Ok still new to modx and need some help and advice. I have seen posts like this but the response wasnt that helpful, I find myself going from post to post to post.

    Anyway what I am trying to do is a website with about 15 categories, each category has a main page with about 10 products listed, with an image and some text with links. When clicked on it takes you to a full page about that product.

    Question is I`m stuck and confused about snippet and chunks. I have installed ditto which I think will put all the brief product listings. I have created all my tv’s with all the information about the products, so my end user can eaily enter all the data - but how to I show that data on the page inside my design? do I create a chunk with just the html with calls to the data or do I use a ditto template?

    The docs for ditto are really bad from a designer point of view.
      I made my first site with modx
      ------------------------
      http://www.shop-bright.com | Uk shopping blog
      • 7923
      • 4,213 Posts
      So how much have you done with the TV’s.. have you added them to some templates yet? When you go to edit a TV, you can set which templates have access to it. Then when you create a document with that specific template selected, you will see that TV below the content field. To get the data from that tv into your template, you simply put [*someTvName*] tag into your template where "someTvName" is the name of the template variable.

      To get the tv’s in Ditto via placeholders, you have to prefix the tv name with "tv" in Ditto’s chunk template (it is documented I believe). So in your ditto chunk, you would have [+tvsomeTvName+].

      Does this help? Feel free to ask more if needed.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 28676
        • 136 Posts
        yea I have used the tv’s now and that option box ticked so they relate to my template, I`ll prob need about 3 templates but that is okay.

        I`m just working my way thu, the difficult thing now is to create a page that pulls out the content categories, thats what I`m doing now with ditto. I`m struggling to get images to work inside my dittotemplate, they work fine within the content page but wont work inside the dittotemplate chunk.

        So so far the template design is ok, tv’s for the page have been created, content has been created, now I need a main category page say "finance" that lists partial content one after the other, ditto can do this with a tv called category and then filter it? with a dittotemplate/chunk or thats what I`m trying to do.

        I`m getting there but its slow the documentation is really all over the shop, however this cms is the best so far so its worth sticking with.
          I made my first site with modx
          ------------------------
          http://www.shop-bright.com | Uk shopping blog
          • 28676
          • 136 Posts
          Actually the image thing is really annoying me now, I have a tv as image, and put the widget as image. But when I try and make a call to this inside the ditto template it just outputs a blank image tag.

          Am I right is saying the syntax is this, because when I use a non image tv is shows up fine but when I use an image tv it wont work. Any ideas would be great.

          [+tvnameoftv+]
            I made my first site with modx
            ------------------------
            http://www.shop-bright.com | Uk shopping blog
            • 12652
            • 228 Posts
            Not sure if this is the correct way, but I added the image code to the template and placed the TV for the image in the source...
            <img src="[*imgTV*]" alt="[*pagetitle*] - [*productName*]" />


            Unfortunately though, unless all images are the same dimensions, I’m not sure how to add those into the code, so maybe there is a better way.
              | Identity Developments delivers SEO focused web design and web presence services
              - it&#39;s not about websites, it&#39;s about your identity. |
              • 28676
              • 136 Posts
              Actually I got it to work now, not sure why it wasnt working, very strange.
                I made my first site with modx
                ------------------------
                http://www.shop-bright.com | Uk shopping blog