0

I am trying to access some TV from another resource using getResources, but nothing is returned.

Here is my code sample

 [[getResources? 
      &resources=`13` 
      &tvPrefix=`tv.` 
      &tpl=`@CODE:[[+tv.DefaultEmail]]` 
      &showHidden=`1` 
      &includeContent=`1` 
      &includeTVs=`1` 
      &processTVs=`1` 
 ]]
Ghoul Fool
  • 6,249
  • 10
  • 67
  • 125
Miomir Dancevic
  • 6,726
  • 15
  • 74
  • 142
  • turn on debuggong, grab the SQL from the log, run it and see if anything is actually being returned. the problem looks like it's with your &tpl attribute. and take a peek here: http://forums.modx.com/thread/?thread=42475&page=1 – Sean Kimball Oct 18 '15 at 17:21
  • 1
    Looks like that's the MIGX format for the inline template code which uses `@CODE:` instead of `@INLINE`. It should be `@INLINE [[+tv.DefaultEmail]]` - see the examples in this section - https://rtfm.modx.com/extras/revo/getresources#getResources-Examples – Mazuhl Oct 19 '15 at 12:54

1 Answers1

1

You have to use @INLINE for the template parameter (see @FILE and @INLINE tpls in https://rtfm.modx.com/extras/revo/getresources#getResources-TemplatingProperties)

&tpl=`@INLINE [[+tv.DefaultEmail]]`

But I would better install FastField to use the following tag syntax [[#13.DefaultEmail]].

Jako
  • 832
  • 5
  • 11