I’m using this code to output a list of news summaries at the News page:
<div id="overview">
[[!getPage@Euroweld:default=`<p>Geen resultaten.</p>`? &element=`getResources` &parents=`3` &tpl=`news_overview` &showHidden=`1` &includeTVs=`1` &processTVs=`1` &tvPrefix=``]]
</div>
<p id="page_nav">[[!+page.nav]]</p>
And this is what the tpl "news_overview" looks like:
<article class="item">
<a href="[[~[[+id]]]]" class="link_more">
<img src="[[+news_image:phpthumbof=`w=195&h=120&zc=1&q=90&f=jpeg`]]" width="195" height="120" alt="Afbeelding bij bericht [[+pagetitle]]">
<h1>[[+pagetitle]]</h1>
</a>
<p class="item_date"><time datetime="[[+publishedon:strtotime:date=`%Y-%m-%d`]]" pubdate>[[+publishedon:locale=`nl_NL`:strtotime:date=`%d %b %Y`]]</time></p>
<p>[[+description:ellipsis=`280`]] <a href="[[~[[+id]]]]">Lees verder</a>.</p>
</article>
That all works fine on the News page. However, I’ve tried to combine these summaries with Archivist, but no luck so far. Here’s the code I use for the archive-links:
<nav id="submenu">
<ul>
[[Archivist? &parents=`3` &tpl=`news_links` &setLocale=`true` &target=`25`]]
</ul>
</nav>
And here’s the code that’s located on the Archive page:
[[!getArchives?
&parents=`3`
&tpl=`news_overview`
&toPlaceholder=`archives`
]]
<div id="overview">
[[!+archives]]
</div>
Now, all the
normal placeholders (id, pagetitle, description, publishedon) seem to work inside the
placeholder,
except the Image TV.
It doesn’t output anything! I’ve tried several combinations with uncached and cached placeholders, but no luck so far.
Also, I’ve set &setLocale to True and my CultureKey to NL, but it
only keeps generating English dates.
So two bugs:
- Image TVs (or perhaps TVs in general) don’t seem to be generated inside the "archives" placeholder at the Archive page]]
- You can’t use &setLocale properly
I could really use all the help I can get. Thanks in advance!
This is my environment, by the way:
MODX 2.0.8
PHP 5.2.16
mySQL 5.1.52