We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29076
    • 615 Posts
    I not shure how to explain what I really want: (I’m tired and my english isn’t up to 100%)

    I want to make over 200 documents as a register over woodenboat-builders in Norway. Every document will have the same layout, with the data for each builder. Like Name, adress, a picture, a description, phonenumber and so on. And I don’t want to copy and paste all the formatting XHTML to every document.

    My idea on how to do this:  huh  tongue  undecided  smiley

    1. I’m making a template with TV’s like name, adress, phone, description etc. assigned to that template.
    2. I make a Chunk with all the XHTML and placeholders for every one of these TV’s.

    Am I going to use Ditto some how to show the data for each document/builder?
    What to put in Content text-box?
    I going in a spinn here in chunks, snippets, TVs and documents. Can someone please help me on my way with these?

    Any help is like gold to me right now.
      I think, thererfor I am! But what I am, and why...?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Make the template and the TVs. Put the TV tags in the template where you’ll want them displayed. Now for each document, as you create it, fill in the TVs. Use an image TV with an image output widget for the image. Put whatever seems appropriate for the "content" field, probably the largest bit of descriptive text, or don’t use it at all if you don’t need it for anything.

      Use Ditto for your listing. Make up a summary template using ’[+tvTVName+] as placeholders for the various TVs.

      For example, I have a simple version of the same thing. I made what was basically a copy of my main template, only where the main content has the [*content*] tag I put
      <h1>[*pagetitle*]</h1>[*Logos*][*content*]

      so the template takes care of displaying a header and the logo image for each manufacturer’s page, while simply content text goes in the content field. To make the listing summaries easier, I just copy/paste the first sentence or two of the main content into the Summary/introtext field. You would just put the rest of your TVs in the template, some before and some after the content tag, if you even use it at all.

      The Ditto summary template has basically the same thing,
          <div class="summary_list">
              [+tvLogos+]
              <h3><a href="[~[+id+]~]">[+title+]</a></h3>
              <p>[+summary+]</p>
          </div>

      A bit of styling, and it’s all done.

        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
        • 29076
        • 615 Posts
        Thank you so much. Sometimes one get totally blind on the things right in front of you. cool
          I think, thererfor I am! But what I am, and why...?