We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 824
    • 44 Posts
    Hi All,

    I have just implemented Ditto and MODx over the weekend and was after a little help / advice on a couple of topics. I have searched the forum, but to no avail, well not in the last couple of hours (though alot of other hints and tips that are really good laugh)

    So firstly, with Ditto’s RSS Feeds is it possible to customise the author field, as i just would like it to say website.com for example.
    I suppose it is picky, but it would be nice to change it. Hopefully its not a pittifully simple solution.

    Secondly, this is not a ditto fault or request but more some aid in styling someone might have some ideas

    im using the following template code its sweet and simple

    #
    <div class="ditto_shortlisting">
        <a href="[~[+id+]~]">[+title+]</a>
    </div>


    What i would like is for each entry to have an incrementing id, even better for it to be in a list with an incrementing id on each li. this is so i can style each one with a different border or somthing to that effect.

    Any suggestions or pointers, not to fussed which.

    Cheers smiley
      • 7923
      • 4,213 Posts
      Quote from: Alan.Graham at Oct 29, 2006, 05:21 PM

      So firstly, with Ditto’s RSS Feeds is it possible to customise the author field, as i just would like it to say website.com for example.
      I suppose it is picky, but it would be nice to change it. Hopefully its not a pittifully simple solution.
      Update to Ditto 1.1 beta, it does not use email address in the author field anymore. I believe it uses the username of the document creator now.. If you still want to change it, you can hardcode it to assets/snippets/ditto/formats/rss.format.inc.php file.

      Quote from: Alan.Graham at Oct 29, 2006, 05:21 PM

      Secondly, this is not a ditto fault or request but more some aid in styling someone might have some ideas

      im using the following template code its sweet and simple

      #
      <div class="ditto_shortlisting">
          <a href="[~[+id+]~]">[+title+]</a>
      </div>


      What i would like is for each entry to have an incrementing id, even better for it to be in a list with an incrementing id on each li. this is so i can style each one with a different border or somthing to that effect.
      Not sure that there is a incrementing id placeholder.. Would be probably good to add one. If you know how many rows Ditto will return for you, you could use the placeholders option in 1.1 beta and then you can use...
      [+item[#]+]
      ...placeholders in your ditto template to refer to individual items (number starting from zero). That way you can put your individual id’s to the templates..


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 824
        • 44 Posts
        Doze,

        You seem to be my gaurdian angel, started on the forums and you have sorted most of my problems already.

        Thanks for the tip about the RSS Feeds, that is basically what i was after laugh.

        With your
         [+item[#]+]


        I presume with my sumary listing of say three that will read 1, 2, 3 on each entry if i were to use it in a ID tag.

        It seems to make sence. laugh

        Thanks again
          • 7923
          • 4,213 Posts
          Quote from: Alan.Graham at Oct 30, 2006, 04:17 AM

          With your
           [+item[#]+]


          I presume with my sumary listing of say three that will read 1, 2, 3 on each entry if i were to use it in a ID tag.
          Yep, so you could do something like:

          <div id="first">[+item[1]+]</div>
          <div id="second">[+item[2]+]</div>
          <div id="third">[+item[3]+]</div>


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 18397
            • 3,250 Posts
            You could use any document object field as somethign to differentiate each item or use the first, last, and alternate templating. As for the RSS, you need not modify the file. You can just use &tpl=`chunkname`.