We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19550
    • 8 Posts
    Hello everyone.

    I don’t understand what happens with my code in MODx Revolution 2.0.5. So, maybe you could be help me whith my problem.

    I created a TV "colorTheme" with a default value "@INHERIT"
    My tree ressources :


    • Parent document 1 (1) => ColorTheme TV = "green"
      [list]
      [li]Child 1 (2) => colorTheme TV = "@INHERIT"
    • Child 2 (3) => colorTheme TV = "@INHERIT"
    [/li]
    [/list]

    I want to list all childs and change the colour of my list with colorTheme TV.
    [[!getResources? &includeContent=`1` &depth=`1` &includeTVs=`1` &parents=`1` &tpl=`prestationsHome.innerTpl`]]


    And my chunk "prestationsHome.innerTpl"
              <div class="[[+tv.colorTheme]]">
                <p>[[+pagetitle]]</p>
              </div>
    


    Actually, Modx shows me "@INHERIT" and not "green".
    How to retrieve the parent value ?

    Thank you for your help smiley
      • 22303 MODX Staff
      • 10,725 Posts
      First, this is a question regarding the getResources add-on, not MODx core.

      Second, this is what the processTVs property is for. Please see http://rtfm.modx.com/display/ADDON/getResources#getResources-OtherProperties
        • 19550
        • 8 Posts
        OOops.
        Ok, thank you OpenGeek.