【问题标题】:getResources Modx return null?getResources Modx 返回 null?
【发布时间】:2016-01-16 21:26:49
【问题描述】:

我正在尝试使用 getResources 从另一个资源访问某些电视,但没有返回任何内容。

这是我的代码示例

 [[getResources? 
      &resources=`13` 
      &tvPrefix=`tv.` 
      &tpl=`@CODE:[[+tv.DefaultEmail]]` 
      &showHidden=`1` 
      &includeContent=`1` 
      &includeTVs=`1` 
      &processTVs=`1` 
 ]]

【问题讨论】:

标签: modx getresource


【解决方案1】:

您必须将@INLINE 用于模板参数(请参阅https://rtfm.modx.com/extras/revo/getresources#getResources-TemplatingProperties 中的@FILE 和@INLINE tpls)

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

但我最好安装 FastField 以使用以下标记语法 [[#13.DefaultEmail]]。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-18
    • 2019-07-30
    • 2013-09-29
    • 2018-04-10
    • 2011-06-19
    • 2016-05-05
    相关资源
    最近更新 更多