We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25969
    • 118 Posts
    I’m going around in circles with this problem which seems harder than it should (hopefully that’s definitely the case). Basically I’ve got a reasonably deep site structure (see attachment) and at the third level (point 1 of the attachment) I use a template which has several TVs which are basically "Subsite attributes" that I would like all children able to access easily. I’ve been using the GetField snippet but it doesn’t seem to work as expected at multiple levels (point 2 in attachment). Here’s what I thought would work, does it look right?

    [!GetField? &parent=`1` &parentLevel=`5` &field=`tvName`!]


    If the explanation makes any sense, does anyone know an easier (or the proper way) to achieve this?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Have you tried TVs with @INHERIT binding? All children of the document you edit the value of the TV for will inherit that value if you don’t edit it for the child document.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 25969
        • 118 Posts
        Nah, the children don’t use any of the TV’s that I’d like to refer to. For a wee more background, I’m creating a parent folder which is for "settings" that would only need to be set once but referred to a lot by the children. I’m trying to keep the templates as light as possible so don’t want to add the TVs to the children document’s template (the parent uses a "settings template") just to have access to the @INHERIT feature.

        Would be sweet if using [*settingLogo*] (with the TV having @INHERIT set) in a template worked but wasn’t actually a TV of the current document’s template. Any other ideas?