I have created the Article row template and using the IF addon as such:
[[!If?
&subject=`[[+author]]`
&operator=`isempty`
&then=`[[+createdby:userinfo=`fullname`]]`
&else=`[[+author]] - Age: [[+age]]`
]]
I would like to display the user info if the TV for author is empty. When I use the IF Addon on the article template it works perfectly but not on the article row template. I have tried it cached and uncached. I have cleared the site cache as well but it only shows the user that created the article.
Can someone help with this?
I am using the latest version of modx, php 5.3
Thanks
Lisa
I can't think of a good way to do that without some custom code. When Articles is cycling through the articles, it will will embed the If snippet in each one, but it if it's uncached, it won't be parsed until later, when each author's data is not available any more. If it's cached, I think you'll get the user of the first article for all of them and the output modifier might not execute.
That is exactly what is happening. I am only getting the user of the first article on the category page. I will have to put together a different solution.
Thanks Bob. BTW I love your book, it's a great resource for me.
Lisa
Thanks for the kind words and for buying my book. The digital version is coming soon.