[[*idRelacionados:is=``:then=``:else=`[[$Rel-Medicinas? &idRelacionados=`[[*idRelacionados]]`]]` ]]
[[+idRelacionados]] <!--This is fine, just a list of id--> <ul class="ID-Rel-Med"> [[!getResources? &parents=`-1` &resources=`[[+idRelacionados]]` &tpl=`@INLINE <li><a href="[[+uri]]">[[+pagetitle]]</a></li>` &depth=`1` &sortdir=`ASC` &limit=`6`]] </ul>
This question has been answered by Bruno17. See the first response.
[[getResources? &parents=`-1` &resources=`[[*idRelacionados]]` &tpl=`@INLINE <li><a href="[[+uri]]">[[+pagetitle]]</a></li>` &depth=`1` &sortdir=`ASC` &limit=`6` &tplWrapper=`wrapperTpl` ]]
<ul class="ID-Rel-Med">
[[+output]]
<ul>
you don't need this chunk-construct at all.
try to call in like that in your template:
[[getResources? &parents=`-1` &resources=`[[*idRelacionados]]` &tpl=`@INLINE <li><a href="[[+uri]]">[[+pagetitle]]</a></li>` &depth=`1` &sortdir=`ASC` &limit=`6` &tplWrapper=`wrapperTpl` ]]
in your wrapperTpl have:
<ul class="ID-Rel-Med">
[[+output]]
<ul>
And I don't see, why you would need it uncached. So I called it cached.
</ul></ul>