Hello,
The following instruction doesn’t work and sends a page without the content (template ok but resource empty):
[[!getResources? &parents=`6` &tpl=`news` &tvFilters=`news_category==Project`]]
when I take the tvFilters instruction it works fine (without the filter).
And if I take the ! out it works fine too (without updating the list on the different pages).
Anyone has a clue of what’s happening?
Thanks,
Thierry
-
☆ A M B ☆
- 3,141 Posts
Does your news_category tv have a value of Project on any of your resources?
As for the caching, I’d advise against using something that gets a lot of data like that uncached. If you want to make sure it shows the last news, just clear cache after posting something new. (Which it does by default, if I’m not mistaken.)
-
☆ A M B ☆
- 3,141 Posts
Ah, like that.
Indeed you’d need it uncached then.
I’m afraid I don’t see a problem with the snippet, perhaps somebody else does....
Thanks Mark.
Maybe there’s another way to do my tagLister landing page?
Anyone?
I set the placeholder via a snippet in the title field.
But the problem shouldn’t come from the placeholder itself since when I write a possible value like "Project" instead, it still make the problem and return an empty content.
The line OG proposed still provokes the same error (I had already tried it).
But I set uncacheable for the page and now it work...
-
MODX Staff
- 10,725 Posts
It’s about order of processing. The snippet that sets the placeholder must run before that placeholder is encountered.