We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20349 ☆ A M B ☆
    • 453 Posts
    Hi!
    I have a template for my subpages and I’m wondering how can I add some content only on certain documents (not all thats uses that template)?

    P.S. If you tell me with TV’s can you explain it a lil’ more? smiley
      BASE - Web Design Studio
      MODX Ambassador

      Website
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Create a TV and leave its default content blank (or use @INHERIT if you want the same content in all the child documents of a given container document). Then edit it for the documents where you want content. If you leave it empty, it won’t put anything in the template.
        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
        • 20349 ☆ A M B ☆
        • 453 Posts
        I’ll give it a try and repost the result wink

        Thanks
          BASE - Web Design Studio
          MODX Ambassador

          Website
          • 20349 ☆ A M B ☆
          • 453 Posts
          Ok, it works.... but this:
          Quote from: sottwell at Dec 13, 2007, 01:59 PM

          use @INHERIT if you want the same content in all the child documents of a given container document
          .. doesn’t. I copy/pasted this @INHERIT under Input Option Values:
            BASE - Web Design Studio
            MODX Ambassador

            Website
            • 20349 ☆ A M B ☆
            • 453 Posts
            EDIT: I forgot to put the default value.... it works now... thanks! =)

            But the problem is that now outputs ALL in every document.

            When I write in my top document @INHERIT some value, it changes only for that certain doc. I tried to put the defult value: @INHERIT, but the same thing happens huh
              BASE - Web Design Studio
              MODX Ambassador

              Website
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              You may have to delete the TV altogether, then create it again with the default value @INHERIT. Once it gets fiddled with on a document level, it can be difficult to get it back to a clean state.
                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
                • 20349 ☆ A M B ☆
                • 453 Posts
                Quote from: sottwell at Dec 13, 2007, 07:58 PM

                You may have to delete the TV altogether, then create it again with the default value @INHERIT. Once it gets fiddled with on a document level, it can be difficult to get it back to a clean state.
                Didn’t worked. I still get output only on doc’s that I changed manually
                  BASE - Web Design Studio
                  MODX Ambassador

                  Website