We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23094
    • 59 Posts
    Many times customer need to decide about e.g. site layout - 2 or 1 column. I need any TV with access to it’s value on all pages but I don’t want to display it on all edited pages. How can I do it?
    Now I prepared top level page called SITE, put there TV’s and set @INHERIT as default. Every subpages display this values, it is not comfortable for customer, some of data (text TV) display "secret word" @INHERIT - it looks not good. Is there another way to set this values global?
      • 7455
      • 2,204 Posts
      you could set the tv to be edited for admin only that way the tv is there but not visible
      but that would not help you.

      there is no other way then show the tv alway’s I think unless you create plugin that looks if the page has a parrent or not then hide the tv if the document has a parent using javascript
      a bit like manager manager
      but i do not think that mm has that option already.
        follow me on twitter: @dimmy01
        • 23094
        • 59 Posts
        Quote from: Dimmy at Sep 28, 2009, 07:48 AM

        you could set the tv to be edited for admin only that way the tv is there but not visible
        but that would not help you.

        I just tested it, when check TV "for admin only ", it is still visible but not editable sad
          • 36926
          • 701 Posts
          You could use ManagerManager to hide it either to certain manager roles or templates.

          http://modxcms.com/extras/package/?package=255
            • 36421
            • 9 Posts
            In the past i would have a "Global Settings" page that would have tvs for all kinds of settings.
            Then you can use GetField snippet to access your settings tvs on any page in the site.

            If you're using YAMS for multi-lingual site you'd do the same thing but make the "Global Settings" page to use multi-lingual template, create a TV for each language (tv_name_en, tv_name_fr, etc.) specify TV values for each language, and then use
            [[YAMS? &get=`data` &from=`tv_name` &docid=`id_of_the_global_page`]]
            . That will retrieve the tv value in proper language.

            I've been thinking that maybe there's a way to add custom settings to MODx default settings and use the settings syntax to get them, but haven't looked into that yet.
            If anybody knows please share.
              • 36421
              • 9 Posts
              subscribing