-
- 463 Posts
I'm trying to get a summary of an article on a 'non-article' page using GetResources. I just can't get the image to show up.
Here is my call:
[[!getResources?
&parents=`4`
&tpl=`sum_flex_ArticleRowTpl`
&showHidden=`1`
&limit=`1`
&sortby=`createdon`
&sortdir=`ASC`
&includeContent=`1`
&processTVs=`1`
&tvPrefix=``
&depth=`0`
&tvFilters=`articlestags==%[[*pagetitle]]%`
]]
And here is my template:
<div class="post">
<div class="flex_post_content">
<a href="[[~[[+id]]]]"><img src="[[+flex_blog_image]]" alt="[[+pagetitle]]" class="flex_blog_post_image" /></a>
<h2 class="title"><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h2>
<p>[[+introtext:default=`[[+content:ellipsis=`400`]]`]]</p>
</div>
<div class="flex_postmeta">
<p><span class="date">[[+publishedon:strtotime:date=`%b %d, %Y`]]</span> [[%articles.posted_by]]
<a href="[[~[[*id]]]]author/[[+createdby:userinfo=`username`]]">[[+createdby:userinfo=`username`]]</a> [[+comments_enabled:is=`1`:then=`<a href="[[~[[+id]]]]#comments" class="comments">[[%articles.comments]] ([[!QuipCount? &thread=`article-b[[+parent]]-[[+id]]`]])</a>`]][[+tv.articlestags:notempty=` | <span class="tags">[[%articles.tags]]: [[!tolinks? &items=`[[+articlestags]]` &target=`[[*id]]` &useTagsFurl=`1`]]</span>`]]</p>
<p><a href="[[~[[+id]]]]" class="readmore button">[[%articles.read_more]]</a></p>
<hr />
</div>
</div>
The output is:
<a href="blog/28/04/2014/10-reasons-to-eat-an-apple-a-day/"><img src="" alt="10 reasons to eat an apple a day" class="flex_blog_post_image" /></a>
What am I missing? Any help much appreciated.
[ed. note: chrisandy last edited this post 10 years ago.]