We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22221
    • 283 Posts
    I want to use a TV to encapsulate the [*content*] tag of my template. But I want to set automatically his value in function of the document group of each document. I want to avoid to copy and modify a template for making little modification.

    Is it possible to link the default value of a TV with the document group of the document ? Or is there another way to do what I want ?

    Thanks


    • Can you give me a concrete example of how the output should change. I’m sure it can be done...
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 22221
        • 283 Posts
        For exemple the TV is [*TV_content*] wich must be on all public page to :
        [*content*]


        But in my news section I want in all the document the [*TV_content*] set to
        [*content*]
        [[MySnippet?]]
        {{FormBlogComment}}
        


        And in an other section I want in all the document the [*TV_content*] set to
        [*createdby*] [*createdon*]
        [*content*]
        [[MyOtherSnippet?]]
        


        I don’t want to edit the TV on each document, And I want to use the document group to set the value of the TV.
          • 32241
          • 1,495 Posts
          There is no easy workaround to this, because the way TV work is based on template, instead of document group.

          ONe thing that you can do, use @INHERIT binding for your TV_Content, and use MODx folder structure to let the value of parent folder being inherited through its child docs and folders. With this, if you have 3 different set of content for TV_Content, then you need to create 3 parent foldersm and put all your docs/folders accordingly to follow thich TV_Content format that you want to use for each of that new docs/folders.

          Hope that helps.

          PS: That’s a way to go have a default TV_Content. It’s one of best practices that each MODx users have to use for their new site design using MODx wink
            Wendy Novianto
            [font=Verdana]PT DJAMOER Technology Media
            [font=Verdana]Xituz Media