(Using Revo 2.2.14)
I have one section in my site, called 'clients' - one page (or resource) per client.
I also have a section in my site called 'news' - again, one page (resource) per news item. And a standard general news page using getResources and a tpl aggregates summaries for all the news items on that one page. Standard stuff.
However, each news item is specifically associated with a single client. So as well as the larger news section, on each client page I'd also like to have a smaller news feed, using getResources call and tpl, but that only brings in news stories associated with that client.
So I created a TV on the News Story template using 'Resource List' - this creates a dropdown of all clients, so the manager can choose the client this news story is associated with. This means if a new client is added it will automatically appear in this dropdown on the news story in the manager.
But I'm not sure where to go from here.
I have the following getResources call on my client page:
[[!getResources? &parents=`44` &limit=`0` &tpl=`client-news-tpl` &includeTVs=`1` &showHidden=`1` &tvPrefix=`` &sortby=`publishedon` &sortdir=`DESC` ]]
which brings in all the news stories fine.
How do I get getResources to filter this as I want it? I'm assuming tvFilter is what I need, but cannot work out what I need to put in it. I believe the actual value stored in the Resources List TV for each resource is the resource ID, so the client page needs to only show news items where the value of the TV is the same as it's own ID. If that makes sense...
I think what's throwing me is that I'm auto-generating the dropdown list using Resource List. If I input my own options as radio buttons or similar I think I could make it work, but I don't want to have to do it every time a new client is added.
Or am I going about this completely the wrong way?
Any help or pointers massively appreciated.