I use [[*tv.imagen]] to recall the document in full and [[+tv.imagen]] for a routine to create a list of document links. The other content element or content tags work fine retrieving [[*pagetitle]], [[*introtext]] or [[+pagetitle]],[[+introtext]] in both cases.
The funny thing is that reviewing the resulting html, when using the TV in a list, the result is empty, no image call at all!
The TV.imagen is image input and default output.
Any idea?
Thanks in advance! Alejandro
The code for the list is:
<tr>
<td> <h2>[[+pagetitle]] </h2>
<p><img src="[[+tv.imagen]]" alt="Inline Image" width="80" height="80" align="right" hspace="8" vspace="3"/>[[+introtext]]
</p><p> <a href="/[[~[[+id]]]]">Leer Nota Completa >>> </a></p>
</td>
</tr>
and the getresources line:
[[!getResources? &parents=`[[*id]]` &limit=`5` &tpl=`aol_col1_rutina` &includeContent=`1` &includeTVs=`1` &processTVs=`1`]]
I don’t see anything wrong except that this line has an extra slash and needs some HTML entities (I doubt if that’s your problem):
<a href="/[[~[[+id]]]]">Leer Nota Completa >>> </a>
Should be:
<a href="[[~[[+id]]]]">Leer Nota Completa >>> </a>
Thanks Bob, I tried with the suggested changes and the results are the same. It is really a strange behavior.
Regards,
Alejandro
When you view at the source of the page, is there anything in the img tag src attribute?
Also, make sure you have a base href tag in your template:
<base href="[[++site_url]]" />
Hi Bob:
All set! Since I noted the problems seems to be from getresources I tried the following:
Changed the name of the TV from tv.imagen to imagen and modified both, the call routine TV and the retrieving call from:
[[!getResources? &parents=`[[*id]]` &limit=`5` &includeTVs=`1` &processTVs=`1` &tpl=`aol_col1_rutina`]]
to
[[!getResources? &parents=`[[*id]]` &limit=`5` &tvPrefix=`` &includeTVs=`1` &processTVs=`1` &tpl=`aol_col1_rutina`]]
And it worked out fine.
The other problem seemed to be slash in the call routine, which I changed from:
<img src="/[[+imagen]]" alt="Inline Image" width="80" height="80" align="right" hspace="8" vspace="3"/>
to
<img src="[[+imagen]]" alt="Inline Image" width="80" height="80" align="right" hspace="8" vspace="3"/>
Thanks again for all your help and best wishes for 2011!
Alejandro
PS the getResources version is 1.2.2
Glad you got it worked out.
As a general rule, MODx supplies any necessary initial slashes, so you almost never need to add your own.