-
☆ A M B ☆
- 24,524 Posts
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.
-
MODX Staff
- 12,272 Posts
Good catch Susan. Thanks!
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
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?
-
☆ A M B ☆
- 24,524 Posts
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
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)
-
☆ A M B ☆
- 24,524 Posts
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.