I want to use "getResources" to show the articles from the "articles" extra on my homepage.
Here is the code of my homepage:
[[getResources? &parents=`52` &tpl=`sample.ArticlesLatestPostTpl` &showHidden=`1` &includeContent=`1` &includeTVs=`1` &processTVs=`1` ]]
and this is my sample.ArticlesLatestPostTpl
:
<li>
[[*myimage]]
<a href="[[~[[+id]]]]">[[+pagetitle]]</a>
[[+publishedon:notempty=`<br /> - [[+publishedon:strtotime:date=`%b %d, %Y`]]`]]
</li>
My template variable is [[*myimage]]
But I cannot see the template variable of the article. Instead I see the template variable of the homepage.
Can somebody help me?
I found the answer.
Instead of [[*myimage]]
I need to write [[+myimage]]
.
And working! :)