【问题标题】:ModX: Using Ditto with template variablesModX:将同上与模板变量一起使用
【发布时间】:2012-09-07 04:59:29
【问题描述】:

我很难用 Ditto 在一个页面上显示一些资源。我似乎无法让电视与我的内容一起显示。

以下是我的说明:

  • 我有一个带有同上调用的页面:

    [!Ditto? &parents='134' &orderBy='createdon ASC' &tpl='temp'!]

  • 我有一个名为temp 的简单块设置如下:

    <div id="content"> [*articlename*] [+content+] </div>

  • 我有一个模板,电视articlename 分配给父 134 下的所有资源。

内容显示正常,但电视没有。谁能指出我正确的方向?谢谢!

【问题讨论】:

    标签: templates modx modx-evolution ditto


    【解决方案1】:

    我认为问题出在你的语法上。您需要在电视的块中使用占位符标记:

    试试这个:

    <div id="content"> [+articlename+] [+content+] </div>
    

    【讨论】:

    • 哈哈,我们是在同一时间发布的 :)
    【解决方案2】:

    我找到了答案:您应该将[+articlename+] 用于“块电视”而不是[*articlename*]。这与 getResources 不同。

    【讨论】:

      猜你喜欢
      • 2013-03-05
      • 2014-10-21
      • 2017-07-16
      • 1970-01-01
      • 2016-03-10
      • 1970-01-01
      • 1970-01-01
      • 2019-02-01
      • 2016-06-02
      相关资源
      最近更新 更多