-
- 10 Posts
Hi,
I’m building an events list using getresources and I want a "No events are currently scheduled" message to be displayed if getresources doesn’t return a result. Is there any way of doing this?
Cheers,
Chris
-
- 327 Posts
I’d like to know the answer to that too...
Author:
ManagerManager plugin - customise your ModX manager interface
Rckt - web development, Sheffield, UK
-
- 327 Posts
Ah, nice one!
I will add a note to the wiki documentation, as it’s useful for those used to Ditto.
Author:
ManagerManager plugin - customise your ModX manager interface
Rckt - web development, Sheffield, UK
If you want to use a chunk, you can always throw that in the :default filter also:
[[!getResources:default=`[[$default-chunk]]`? ... ]]
-
- 10 Posts
I knew there must be a way - thanks for your help guys!
-
- 9 Posts
My default stuff shows every time too. Looks like a fresh bug. Developers?
Works fine if you apply filters for the placeholers themselves, after a getResources snippetcall :
[[!+results:notempty=`<ul class="catalog">[[+results]]</ul>`]]
[[!+results:default=`no stuff today`]]
And it's better to keep it uncached
[ed. note: remort last edited this post 10 years, 4 months ago.]
-
- 375 Posts
Quote from: romain at Apr 05, 2011, 01:03 PMYou might want to try
[[!getResource:default=`No result found`?
¶m=``
…
]]
]
Edit: http://rtfm.modx.com/display/revolution20/Tag+Syntax#TagSyntax-StructureofaTag is always a good reading
I know this is an old post, but your hint doesn't work when using
&toPlaceholder property.
This is why it doesn't work for @LouCash.