2014-01-29 34 views
0

我试图从模板变量中检索图像。不过,我正在尝试将博客模板上的图像拉出来。每当我走下一层时,它都可以毫无问题地工作。我试过使用GetResources和GetResourceField来获取顶层的图像,但目前为止没有结果。这是我的代码,任何建议都会很棒。MODX Rev:从电视检索图像

[[getResourceField? &id=`[[*articleImage]]` &isTV=`1` &processTV=`1`]] 

[[*articleImage:phpthumbof=`w=120&h=120`]] 

      [[!getResources? 
       &showHidden=`1` 
       &limit=`4` 
       &includeContent=`1` 
       &includeTVs=`1` 
       &processTVs=`1` 
      ]] 
+0

好了,所以我说:TPL ='imgBlog'所以结果是输出到块。但是,块仍然无法检索图像路径。 GetResources似乎工作。任何帮助? – Eagle

+0

好的问题解决了,这是使用的代码: 模板: [[!getResources? &showHidden ='1' &TPL ='imgBlog' &极限='4' &includeContent ='1' &includeTVs ='1' &tvPrefix ='tv.' ]] 组块: Hoi Eagle

回答

0

如何你想访问你的imgBlog块你的形象,如果你使用的是你应该用getGresources:

[[*tv.articleImage:phpthumbof=`w=120&h=120`]]