We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18399
    • 60 Posts
    I have a problem with the ticker widget.

    I am using the @CHUNK binding
    The chunk contains a ditto call

    I get just <li id="tickerItem0"> followed by the entire output of the ditto call in a straight line including the ||
    part that is supposed to separate the different items.

    ie <li id="tickerItem0">item 1 || item 2 || item 3 || item 4 || item 5</li>

    just one non-rotating item.

    If I replace the ditto call in the chunk with the text result of the ditto call (ie the text) then I get the items processed
    properly as:

    <li id="tickerItem0">item 1</li>
    <li id="tickerItem1">item 2</li>
    <li id="tickerItem2">item 3</li>
    <li id="tickerItem3">item 4 </li>
    <li id="tickerItem4">item 5</li>

    So the ditto output is good, but it seems to be created after the ticker widget acts on it so it doesn’t get to separate the items.

    How do I get this to work? 5 hours is enough for me, I’m out of ideas.

    Mark

      • 18399
      • 60 Posts
      I have solved my issue with this.

      First of all there is no documentation anywhere on using the ticker widget that’s worth anything at all. No examples, no nothing.

      The answer is unexpectedly trivial.

      Instead of, as per the instructions when you use the ticker widget (where it says you should delimit using ||) if you create a document with
      item </li><li>item 2</li> etc the ticker works great.

      Delimitation with || works fine if you post actual text in the form item1 || item2 || item 3 etc

      <li id="tickerItem0">item 1</li>
      <li id="tickerItem1">item 2</li>
      <li id="tickerItem2">item 3</li>
      <li id="tickerItem3">item 4 </li>
      <li id="tickerItem4">item 5</li>

      but if you want to use output from a ditto call then it doesn’t work with || instead you should move straight to delimiting using </li><li> and using a &tplFirst you don’t put anything in front of the first item. It turns out that you don’t need an id of tickerItem1, tickerItem2. tickerItem0 is introduced automatically.

      So to get the ticker widget to work you create a template variable, bind to a chunk from the Default value (not Imput Option Values which doesn’t work at all and whose purpose is completely unclear to me) so you have something like @CHUNK ticker_ditto. Create a chunk with a ditto call with whatever you want to call from the database (and presumably other stuff if you want) and two templates, a first template with item</li> and a normal template with <li>item</li> for the rest and the ticker works great.

      All this of course is completely nuts but that’s life and I wish there was some documentation somewhere that had explained this because that’s a lot of hours I’m not getting back. I hope this is of help to someone.

      Mark