We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • The newest version of NewsListing doesn’t respect the &trunc=`false` argument. It will truncate the article no matter what arguments you feed it. I think the check for !$trunc should come at the very end of the summary checking code starting at line 482, even after the post-processing section, somewhere around line 516. At least, I put it there and now it works just fine.
      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
    • Good catch Susan. Thanks!
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 18397
        • 3,250 Posts
        Susan, it does!

        For some bizzare php reason, you need to pass a 0 in the parameter instead of false to make the variable false.

        Which version of NL are you having the trouble with?
        • I put 0 and it still didn’t do the trick. I do know that it can get strange results with ’true’ and ’false’ and ’0’ and ’1’ literal values when you use the shortcut "if($variable)" or "if(!$variable)". I ended up putting

          if($trunc == 'false') {$summary = ... ;{
          at the point I mentioned above, and it seems to be working.

          It’s the version that comes with 0.9.1
            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
            • 18397
            • 3,250 Posts
            Susan,

            That is like 2.x.x versions old!

            Please get the newest version in the NewsListing thread. (I’ve patched ALOT of bugs since 4.4)
            • Ah, right! Will do, thanks.

              Done.

              [!NewsListing?startID=`8`&summarize=`1`&trunc=`false`&tpl=`ArticleTpl`&archivetext=`More Articles`!]
              


              And it truncates the article, as you can see here:

              http://www.sottwell.com

              Ahah! Used &trunc=`0` and it works now.
                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