modxmodx-getresources

Modx getresources cant reat template variable


I have this

[[getResources? &parents=`10` &limit=`0` &tpl=`videos_tpl` &sortby=`menuindex` &sortdir=`ASC`]]

and I created a chunk for tpl videos_tpl

<p>[[+pagetitle]]</p>
<div class="jetpack-video-wrapper">
<span class="embed-youtube" style="text-align:center; display: block;">
[[+youtube]]                                    
</span></div>

It's working with the pagetitle but not for the youtube tag any clue?


Solution

  • if i undestand you correctly you have some TV named "youtube" with YT embeded video code tag, if so please use next getResources snippet call:

    [[getResources? &parents=`10` &limit=`0` &tpl=`videos_tpl` &sortby=`menuindex` &sortdir=`ASC` &tvPrefix=`` &includeTVs=`1` &includeTVList=`youtube`]]
    

    This should works well with you chunk code