It didn't work for me, Bruno17, but no doubt because I'm missing quite a bit of necessary knowledge.
However, let me alter this question somewhat, since you inspired me to follow a different path.
Instead of a custom TV, let's say I'm trying to publish a set of resources that have happened in the past, as per the pubilshedon date.
So, I tried the following, but it didn't work because I'm PHP-challenged. I figured I would create two lists, the first showing only the resources that are yet to come and the second only the resources that have happened in the past. This displayed code is for the first list (don't show events published before today):
1. The listings call (I'm testing this on a blog-like listing on a test site before I bungle a client's site) looks like this:
<div id="blog_articles_list">
[[!getResourcesTag?
&elementClass=`modSnippet`
&element=`getResources`
&tpl=`blogPost`
&parents=`2`
&limit=`50`
&includeContent=`1`
&includeTVs=`1`
&showHidden=`1`
&hideContainers=`1`
&cache=`0`
&pageVarKey=`page`
&tvFilters=`[[!date_past]]`
]]
</div><!--blog_articles_list -->
<hr>
Take note of the
&tvFilters=`[[!date_past]]`
...part.
2. Created a snippet called date_past and added the following comedy:
<?php
if( $publishedon = ($publishedon < time())) {
return NULL;
}
Not surprised it didn't work because I'm not that level of PHP coder, but hopefully it shows enough to communicate what I'm trying to do. In that listing, I wanted to NOT display anything before a published on date.
Then, after that listing, I would create another listing that displayed them, utilizing the "opposite code" of what you see. Make sense?
A bit over my head here, but it would be nice to figure this out.