Hi
I am currently trying to create a 'featured artists' section on a site using the ResourceList TV.
I have created the TV and selected the artist I wish to feature, but I cannot call this information using getResource for some reason. This is my getResource call:
[[!getResources?
&parents=`20`
&id=`[[*FeaturedArtist]]`
&tpl=`FeaturedArtistTpl`
]]
The parent container for the artists pages has an ID of 20, and the ResourceList TV is called 'FeaturedArtist'.
The chunk 'FeaturedArtistTpl' currently just has [[*pagetitle]] (which I had hoped would output the band name) but instead of outputting the name of the selected band, it instead shows the page title for the page I am on (currently 'Home'). If I insert [[*FeaturedArtist]] onto the page it outputs the correct ID so I can't work out what is going wrong.
I have tried adding processTVs and includeTVs to no avail.
any ideas?
Andy
to get the pagetitle, you have to use the placeholder
is the resourcefield-tag for the pagetitle of the current resource.
to get the filtered resource(s), use the property &resources, like:
[[!getResources?
&parents=`20`
&resources=`[[*FeaturedArtist]]`
&tpl=`FeaturedArtistTpl`
]]
Hi Bruno
Thanks for the speedy reply!
I have now managed to output the page title, and the published date (although I do not actually need this, was just testing some stuff out) but I am having difficulty getting anything from TVs that I have created. I have included includeTVs and processTVs in the getResources call on the homepage template but I am getting nothing back.
I have tried using
[[*Artist Image]]
[[*bio]]
and
[[+Artist Image]]
[[+bio]]
(Artist Image and Bio are my two TV names)
Andy
Try adding this:
Without it, getResources is looking for TVs named tv.Bio and tv.Artist Image.