I’ve been trying to get my head around this great snippet, not for blogging purpose : for those who have come upon my other post, I have been wondering how to
use TVs or add custom variables to this snippet.
Not successful yet, so I got my head in it and found out the &tpl parameter. The documentation says : &tpl - name of the chunk to use for the summary view template. Well, great, let’s do that then I thought I could at last use TVs along with the NewsListing variables in the summary view.
I have a chunk containing the following :
<div class="summaryPost">
<h3>[+title+]</h3>
<div class="float_right">[*picture*]</div>
<div>[+summary+]</div>
<div>[*location*] - [*price*]</div>
<span class="lien">[+link+]</span>
</div>
And my document contains
[[NewsListing? &tpl=`fiche` &summarize=`15` &truncText=`Voir le détail de la fiche` &emptytext=`Désolé, nous n’avons aucune fiche correpondant à votre demande pour le moment`]]
But I get a parsing error :
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: strtotime() [function.strtotime]: Called with an empty time parameter.
Error type/ Nr.: Warning - 2
File: C:\Program Files\xampp\htdocs\fuchslock\manager\includes\tmplvars.format.inc.php
Line: 67
Line 67 source: $timestamp = strtotime($value);
Parser timing
MySQL: 0.0376 s s (5 Requests)
PHP: 0.4337 s s
Total: 0.4713 s s
I think I didn’t quite understand something there...