Pregunta

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.

¿Fue útil?

Solución 2

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.

Otros consejos

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!=''`
   ]]
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top