We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9191
    • 20 Posts
    I’m using Ditto to list out a bunch of articles and I want to have it print out where every other line has a different color. Essentially a placeholder where this article it prints "0" and next article it prints out "1" and then 0 and then 1 and so on. Is this possible?
      • 10449
      • 956 Posts
      I guess this is what you’re looking for:
      &tplAlt -- The template you specifiy with this parameter will be used for every-other item in the list.
      (from the manual )
        • 9191
        • 20 Posts
        That works, I guess I was hoping for a placeholder type solution so I didn’t have to have two templates for the same thing, I could just make it happen with CSS.
          • 24414
          • 45 Posts
          I would be inclined to use JavaScript to deal with this - have a look at the Splintered Striper script @

          http://24ways.org/2005/splintered-striper


          • targets any type of parent element (and, if specified, only those with a certain class)
          • assigns two or more classes (rather than just two background colours) to the child elements inside the parent
          • preserves any existing classes already assigned to the child elements