We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10386
    • 42 Posts
    I am not sure to get Binding, but i think this is what is needed here, (so far i have managed using a dirty Js fix after the HTML page is loaded)

    >> I have a TV -background hex color- in the parent resource. The parent displays a [[getResources?.. of a chunk, which should be styled according the parent value, how can i access the TV -background hex color- from the chunk?

      • 3749
      • 24,544 Posts
      That's a tough one. This snippet code should get the value of the parent's hex TV

      Put this tag where you want the parent's hex value:
      [[!GetParentHexValue? &parentId=`[[+parent]]` ]]


      Snippet code:

      <?php
      $parent = $modx->getObject($scriptProperties['parentId']);
      return $parent->getTVValue('background hex color');
      


      I'm not sure it will work. It depends on the parsing order and on whether getResources sets a [[+parent]] placeholder.







        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