We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20765
    • 90 Posts
    myfriendscallmebill Reply #1, 19 years, 6 months ago
    Apparently Ditto has a placeholder:
    [+item[x]+]

    For which the only documentation is the phrase:
    "rendered output of an individual document"

    I’ve tried to figure out how to use this, but to no avail. Is it used in item-level templates, or at the page level? What does it do? How to I make it function? Can someone please elucidate...?
      • 18397
      • 3,250 Posts
      Its used on the page level and returns the rendered output of document x. So, if you wanted to show the output of the 3rd item somewhere other than in the Ditto sequence (it will still be displayed there however) you would place [+item[2]+] (x starts at 0) there.
        • 20765
        • 90 Posts
        myfriendscallmebill Reply #3, 19 years, 6 months ago
        Quote from: Mark at Mar 29, 2007, 12:17 AM

        Its used on the page level and returns the rendered output of document x. So, if you wanted to show the output of the 3rd item somewhere other than in the Ditto sequence (it will still be displayed there however) you would place [+item[2]+] (x starts at 0) there.

        Huh. I thought I tried that before and it didn’t work, but it’s working now (Ditto r1406). So three more questions:

        o Why do you start at zero rather than at one (I found this hard to deal with when I was testing)?

        o What would you use this for?

        o I assume this uses the current item-level template. Is this the kind of thing that should have it’s own template?
          • 18397
          • 3,250 Posts
          Actually there is a bug in 1404-1406 that was introduced when I changed the start and end behavior of the loop to fix the bugs you found. Download 1409 before you try using this.


          1. It starts at 0 because thats how all loops in programming start. Also, &start starts at 0.
          2. This is used for things like showing 3 random items with an ad in-between. You’d set save to 3 and then put the item placeholders in your document with the ad inbetween.
          3. This uses whatever template would normally be applied to the document if it were still in the loop.