-
☆ A M B ☆
- 1,780 Posts
This is a tale of two sites...
Call them Tattoo and Weather.
On the Tattoo site, I am using getResources to show newsletters with [[+introtext:ellipsis=`200`:default=`[[+content:striptags:ellipsis=`200`]]`]] which works, but if introtext is empty it does not grab the content.
I noticed that they (people) aren't always filling in the introtext and some of the articles in the main page show no content.
Fine, so to make it simple in the case they don't use introtext, we'll just get the content instead all the time and forget the introtext. [[+content:striptags:ellipsis=`200`]].
This results in no text.
On the Weather site, I am using
[[+introtext:ellipsis=`200`:default=`[[+content:striptags:ellipsis=`200`]]`]] and testing an empty introtext on a resource results from the content field just as expected. (gives me 210 characters, interestingly enough)
When I try [[+content:striptags:ellipsis=`200`]], I do get the text content from the right side of a ContentBlocks layout, while the left side contains an image. So based on this test, that should work on the Tattoo site that just has the default content field from CB.
To see if I can determine if this has anything to do with the default field from CB, on the Tattoo site I tried to replicate the method I created resources with on Weather site. Deleted the content field, replaced with rich text. Then deleted the layout entirely and replaced it all again. Neither method allowed the text to come though just using [[+content:striptags:ellipsis=`200`]]
I then turned off ContentBlocks entirely on a single resource on the Tattoo site just to be sure, and updated ContentBlocks. Same result. Thus, I do not think this has anything to do with ContentBlocks.
Thoughts as to what could be broken on the Tattoo site?
Tattoo site is running MODX 2.2.3 (about to update, just got approval). Using getResources and getPage for this output. Switching to pdoResources breaks the ability to use publishedon for the date (which is why I noticed this issue, was in there checkin on stuff).
Weather site is running MODX 2.2.5 and I'm using pdoResources there (verified broken [[+publishedon]] with pdoResources while getResources seems to be completely broken==no workie at all).
The getResources being broken is likely a completely different issue but I welcome any thoughts on that as well.
They are both on the same MODX friendly server at SkyToaster.