0

I'm trying to use getResources to only show the resources with a certain type of template variable. I know I'm doing something wrong b/c the page is displaying all template vars:

[[!getResources? 
&parent=`[[*id]]` 
&showHidden=`1` 
&limit=`0` 
&tpl=`Dining Section` 
&includeContent=`1` 
&includeTVs=`1` 
&processTVs=`1` 
&tvPrefix=`` 
&tvFilters=`Dining Section Title != ''`]]

In the last argument I am trying to only display resources with the TV "Dining Section Title". Any help would be appreciated.

OptimusCrime
  • 14,662
  • 13
  • 58
  • 96
symlink
  • 11,984
  • 7
  • 29
  • 50

2 Answers2

1

Your syntax is missing the backticks around the option values and you cannot have spaces in Chunk or TV names. Check what the actual TV and Chunk names are, then reformat your snippet call like this:

[[!getResources? 
   &parent=`[[*id]]` 
   &showHidden=`1` 
   &limit=`0` 
   &tpl=`DiningSection` 
   &includeContent=`1` 
   &includeTVs=`1` 
   &processTVs=`1` 
   &tvPrefix=`` 
   &tvFilters=`DiningSectionTitle!=''`
   ]]
okyanet
  • 3,106
  • 1
  • 22
  • 16
  • I think the ticks are already there. I'm using Revo, and it's letting me use chunks and TVs with spaces. There are seven resources under the id `[[*id]]`, but only three even have the TV 'Dining Section Title'. – symlink Feb 11 '13 at 00:14
0

I solved it. I needed to remove the single quotes from the tvFilters value.

[[!getResources? 
  &parent=`[[*id]]` 
  &showHidden=`1` 
  &limit=`0` 
  &tpl=`Dining Section` 
  &includeContent=`1` 
  &includeTVs=`1` 
  &processTVs=`1` 
  &tvPrefix=`` 
  &tvFilters=`Dining Section Title!=`
]]

Thanks okyanet for the help.

symlink
  • 11,984
  • 7
  • 29
  • 50