We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10702
    • 107 Posts
    Does anybody know how to output a TV using getResources?

    I tried this, but it doesn´t work:

    [[!getResources? &parents=`[[*id]]` &tpl=temphead` ]]


    Code of the Chunk "temphead":
    <div>   
      <p><a href="[[~[[+id]]]]" title="[[*temphead]]">[[*temphead]]</a></p>   
    </div>   
    


    Thanks to everybody can help!
    Gerdi
      • 22019
      • 390 Posts
      In your snippet call add:

      If you want the raw value of a TV (eg the file location of an image reference) you need to include &includeTVs=`1`
      If you want the processed value of a TV (eg an inline image) you need to include &processTVs=`1`

      By the way - if you drag a snippet from the tree into your content (or any acceptable area) it will display the full propertyset for that snippet, which often saves time and helps you see other features.
        Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
        • 10702
        • 107 Posts
        Works very well! Thanks a lot!

        Do you also know how to give the output-level-1 a certain style which is different to the output-level-2?

        For example bold for level 1 and italic for level 2?
          • 29076
          • 615 Posts
            I think, thererfor I am! But what I am, and why...?
            • 10702
            • 107 Posts
            Thanks a lot for this hint. But as far as I understood the manual tplFirst serves for the first resource and not for the first level. Is this correct?
              • 29076
              • 615 Posts
              Ok, my mistake. smiley What do you exactly put in the word level in this case?
                I think, thererfor I am! But what I am, and why...?
                • 10702
                • 107 Posts
                What do you mean by word level?

                My goal is this:

                Head (Resource Level 1)
                Article 1 (Resource Output Level 2)
                Article 2 (Resource Output Level 2)
                  • 36592
                  • 970 Posts
                  In your case, I’d use Wayfinder snippet.
                  http://rtfm.modx.com/display/ADDON/Wayfinder