Modx getresources cant reat template variable

132 views Asked by At

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?

1

There are 1 answers

0
Anton Tarasov On BEST ANSWER

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