We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36704
    • 131 Posts
    Hi there,
    Currently i am using the NewsPublisher for my front end editing
    I activate the Tabs. My problem is how to remove the Showall Tabs?

    Heres is my code:
    [[!NewsPublisher?
       &show=`StudentNo,StudentName,Address,contactno,grade_select,ModeOfPayment,1stPaymentDate,1stPaymentOR,1stPayment,2ndPaymentDate,2ndPaymentOR,2ndPayment,3rdPaymentDate,3rdPaymentOR,3rdPayment,4thPaymentDate,4thPaymentOR,4thPayment,5thPaymentDate,5thPaymentOR,5thPayment,6thPaymentDate,6thPaymentOR,6thPayment,7thPaymentDate,7thPaymentOR,7thPayment,8thPaymentDate,8thPaymentOR,8thPayment`
       	
            &initdatepicker=`1`
            &parentid=`60`
    	&hidemenu=`1`
            &published=`1`
            &template=`22`
    	&postid=`[[~[[+id]]]]`								
    	&required=`StudentNo,StudentName,Address,contactno,grade_select,ModeOfPayment`
    	&usetabs=`1`
        	&activetab=`StudendInfo`
        	&tabs=`{
            "StudentInfo" :  ["StudentNo","StudentName","Address","contactno","grade_select","ModeOfPayment"], 
            "Payment" :  ["1stPaymentDate","1stPaymentOR","1stPayment","2ndPaymentDate","2ndPaymentOR","2ndPayment","3rdPaymentDate","3rdPaymentOR","3rdPayment","4thPaymentDate","4thPaymentOR","4thPayment","5thPaymentDate","5thPaymentOR","5thPayment","6thPaymentDate","6thPaymentOR","6thPayment","7thPaymentDate","7thPaymentOR","7thPayment","8thPaymentDate","8thPaymentOR","8thPayment"]
        }` 
    		
    ]]


    The Tabs are showing:
    1. StudentInfo
    2. Payment
    3. Show All (i dont want to show this tab)
    Another thing, is it possible to modify the templating of tabs?
    Thank you very much!
      • 3749
      • 24,544 Posts
      You might try commenting out the second line in this code in the nptabsjs chunk:


      if (selector == '*') { /* Show All */
                formChildren.removeClass('np-hidden');
      }


      Change it to:

      if (selector == '*') { /* Show All */
              /*   formChildren.removeClass('np-hidden'); */
      }



        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 36704
        • 131 Posts
        Hi BobRay,

        Thanks for your support, i did try commenting out the second line in this code in the nptabsjsTPL chunk and all the items on the Show All tabs are gone but the "Show All" Tabs are still there.

          • 3749
          • 24,544 Posts
          Quote from: alyainec at Dec 03, 2012, 12:03 AM
          Hi BobRay,
          I did try commenting out the second line in this code in the nptabsjsTPL chunk and all the items on the Show All tabs are gone but the "Show All" Tabs are still there.

          Sorry, I didn't write the tabs code so I was making a bad guess -- change that code back to the way it was. Here's another guess:

          In the same file, change this:

          htmlButtons =   '<section id="np-tabs" class="clearfix">' +
                                 '<ul id="' + filterId + '">' +
                                    htmlButtons +
                              '<li id="other-filter"><a data-filter="!*" href="#">[[%np_tabs_other]]</a></li>' +
                              '<li class="data-filter"><a data-filter="*" href="#" class="' + (hasFilterSelected ? '' : filterSelected) + '">[[%np_tabs_show_all]]</a></li>' +
                                  '</ul>' +
                              '</section>';
          


          to this:

          htmlButtons =   '<section id="np-tabs" class="clearfix">' +
                                 '<ul id="' + filterId + '">' +
                                    htmlButtons +
                              '<li id="other-filter"><a data-filter="!*" href="#">[[%np_tabs_other]]</a></li>' +
                                  '</ul>' +
                              '</section>';
          
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 36704
            • 131 Posts
            Hi Bobray,

            Finally it work's.

            Once Again thank you very much!
              • 3749
              • 24,544 Posts
              I'm glad that worked for you. smiley

                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting