We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9995
    • 1,613 Posts
    fourroses666 Reply #1, 14 years ago
    I use 1 template.
    Back-end I'd like to show only on ID 1 (home) an extra tab with some TV's using ManagerManager.

    In chunk mm_demo_rules I have add:

    if($id !=1) {
    mm_hideFields('laatste-nieuws');
    mm_hideTabs('laatste-nieuws');
    }
    
    // make tab for managing content
    mm_createTab('Laatste nieuws', 'laatstenieuws');
    mm_moveFieldsToTab('laatste-nieuws', 'laatstenieuws');


    this doesn't hide the tab, how do I hide the tab for the other resources?
    mm_hideTabs doesn't seem to work?

    This doesn't work either for the tab:
    if($id !=1) {
    mm_hideFields('laatste-nieuws');
    mm_hideTabs('Laatste nieuws', 'laatstenieuws');
    }
    
    if($id =1) {
    mm_createTab('Laatste nieuws', 'laatstenieuws');
    mm_moveFieldsToTab('laatste-nieuws', 'laatstenieuws');
    }



    mm_hideTab('laatstenieuws'); gives error, hideTabs doesnt do anything [ed. note: fourroses666 last edited this post 14 years ago.]
      Evolution user, I like the back-end speed and simplicity smiley
      • 9995
      • 1,613 Posts
      fourroses666 Reply #2, 14 years ago
      The solution:

      if($id ==1) {
      mm_createTab('Laatste nieuws', 'laatstenieuws', '', '3', '<p>Some text?</p>', '450');
      mm_moveFieldsToTab('laatste-nieuws', 'laatstenieuws');
      }


      3=the template
      Some text?=u can leave it blank
      450=width


      Now I say only when id = 1 do that stuff!
        Evolution user, I like the back-end speed and simplicity smiley
        • 19369
        • 1,098 Posts
        Cool I've never thought about using MM in this way, thanks for sharing this solution.
          • 9995
          • 1,613 Posts
          fourroses666 Reply #4, 14 years ago
          Yea, I never knew it was possible. Very handy and "easy" to do smiley

            Evolution user, I like the back-end speed and simplicity smiley
            • 36416
            • 589 Posts
            Quote from: microcipcip at Sep 07, 2012, 12:15 PM
            Cool I've never thought about using MM in this way, thanks for sharing this solution.

            Yeah, cool "secret" functionality:
            https://forums.modx.com/index.php?topic=40937.0
              • 9995
              • 1,613 Posts
              fourroses666 Reply #6, 14 years ago
              Found info on Susans website and when u download latest version of ManagerManager look into docs.

              http://modx.com/extras/package/managermanager

              http://sottwell.com/mm-tvs.html [ed. note: fourroses666 last edited this post 14 years ago.]
                Evolution user, I like the back-end speed and simplicity smiley
                • 9995
                • 1,613 Posts
                fourroses666 Reply #7, 14 years ago
                Got a question I can't find.

                How can I use parents instead of ID?
                When i change the code from id== to parent== nothing happens.

                if($id ==23) {
                mm_createTab('Afbeeldingen', 'racingcars', '', '3', '', '650');
                mm_moveFieldsToTab('thumb01', 'racingcars');
                }
                
                if($id !=23) {
                mm_hideFields('thumb01');
                }
                



                ## EDIT ##


                if($content['parent'] == 22){

                if($content['parent'] != 22){
                [ed. note: fourroses666 last edited this post 14 years ago.]
                  Evolution user, I like the back-end speed and simplicity smiley