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

    EDIT:

    I’m trying Ditto but I really don’t know how/where to write.

    I have created a chunk called DittoTemplate with the following code:

    <div class="ditto_item" id="ditto_item_[+id+]">
            <h3 class="ditto_pageTitle"><a href="[~[+id+]~]">[+pagetitle+]</a></h3>
            <div class="ditto_documentInfo">by <strong>[+author+]</strong> on [+date+]</div>
            <div class="ditto_introText">[+introtext+]</div>
    </div>
    


    I’m calling that chuck on my main page like this:

    [[Ditto? &tpl=`DittoTemplate`]]
    


    Is this correct?

    If yes, what is the next step? Where do I create a sample news?


    Sorry, I’m new to this.


    PS: I’m using the latest version of evolution.


    Best regards.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      In the Manager, create new documents under your News container document. Ditto just displays news items, it has nothing to do with creating news documents.
        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
        • 25679
        • 37 Posts
        Thank you smiley

        One final question. On my template, I have the variable introtext to display a little of the text on my news, but it isn’t working.

        EDIT:

        Ok I got it. I was using the wrong variable smiley

        With
        <div class="ditto_introText">[+content:limit=`200`+]</div>
        is now working.


        Thanks in advance.