We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1354
    • 6 Posts
    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`]]

      • 3749
      • 24,544 Posts
      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>
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 1354
        • 6 Posts
        Thanks Bob, I tried with the suggested changes and the results are the same. It is really a strange behavior.

        Regards,

        Alejandro
          • 3749
          • 24,544 Posts
          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]]" />
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 1354
            • 6 Posts
            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
              • 3749
              • 24,544 Posts
              Glad you got it worked out. smiley

              As a general rule, MODx supplies any necessary initial slashes, so you almost never need to add your own.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting