We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25551 ☆ A M B ☆
    • 1,231 Posts
    Hello,

    Could someone tell me how exactly to include the placeholders in a chunk as they never appear to work correctly.

    An example of my Tpl is below but the summary is not showing. I have typed out a summary in the box of the documents. I have tried other placeholders and they don’t seem to work. I’m using the latest ditto and using this call

    [[Ditto? &startID=`29` &tpl=`dittoTpl`  &summarize=`40` &total=`40` &sortBy=`createdon` &sortDir=`ASC` ]]


        <div class="ditto_item" id="ditto_item_[+id+]">
            <h3><a href="[~[+id+]~]">[+pagetitle+]</a> || Last Update : [+date+]</h3> 
    <p>[+summary+]</p>
    
     </div>



    I would like to have the page name appear and be clickable with the last edited date... also I would like to include the summary text under so people know what is on each page.

    Thanks!
      Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
      AugmentBLU - MODX Partner

      BLUcart - MODX Revolution E-Commerce & Shopping Cart
      • 36592
      • 970 Posts
      To use [+summary+], use &extenders=`summary`.
      To set source of [+date+] as the last edited date&time, use &dateSource=`editedon`.
        • 25551 ☆ A M B ☆
        • 1,231 Posts
        Hmmm edited my post.

        It worked kind of... how ever if I change the dittoTpl to the following, the whole design is out of shape.

        <h3><a href="[~[+id+]~]">[+pagetitle+]</a> || Last Update : [+date+]</h3>
        <p>[+summary+]</p>

        and also if i actually enclose the ditto call in anything other that a header tag it is all out of shape and wrong.

        What could be the problem with this? huh
          Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
          AugmentBLU - MODX Partner

          BLUcart - MODX Revolution E-Commerce & Shopping Cart
          • 25663 MODX Staff
          • 12,272 Posts
          If it’s returning results as expected, but they look wrong, it’s a CSS problem. You should also review the Ditto 2 conversion guide located at ditto.modxcms.com, as you’re using at least one deprecated parameter. The &startID param should now be &parents, which allows you to set one or more parent directory under which you can build results.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 7231
            • 4,205 Posts
            and also if i actually enclose the ditto call in anything other that a header tag it is all out of shape and wrong.
            A header tag is a block (as opposed to inline). Check the styles and markup for conflicting styles or open tags.
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don&#39;t know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 25551 ☆ A M B ☆
              • 1,231 Posts
              Yeah I know about the header tags... it was the only thing that would work. Anyway there was a problem with 2 of my pages ditto was searching... All seems to be displaying correctly now.

              Thanks for the help. grin
                Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                AugmentBLU - MODX Partner

                BLUcart - MODX Revolution E-Commerce & Shopping Cart