We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20401
    • 13 Posts
    thanks bob1000, that makes things clearer for me.

    cheers
      • 15814
      • 2 Posts
      Unfortunately, snippet does not allow to place in affiliated pages active contents, for example on java. Images inserted into them, do not allow to work with snippet DirectRezize. Somebody faced this problem?
        • 33172
        • 4 Posts
        Hi,

        I am new to modx...
        could anyone one please tell me
        from which file i should copy code to snippet (class.tabControl.php OR snippet.tabControl.php)
        i have one parent page - sample
        and i have two pages sampleChild1 and sampleChild2

        I want to add this child pages in tabs on sample.php
        how could i do this?
        [[tabControl? &parents=`parents` &tpl=`tpl`]]
        is there is example of ’tpl’ and parents = resource id of "sample" page but on which page i should add the follwing code

        [[tabControl? &parents=`parents` &tpl=`tpl`]]

        <ul class="tabs">
        [+tabs+]
        </ul>
        <div class="tabContent">
        [+content+]
        </div>

        Please please reply. this is urgent
        Thanks in advance
          • 26931
          • 2,314 Posts
          from which file i should copy code to snippet (class.tabControl.php OR snippet.tabControl.php)
          from snippet.tabControl.php
          and parents = resource id of "sample" page but on which page i should add the follwing code
          the snippet call goes on the parent page and if that would be ressource with an id if 25 you add parameter &parents=`25` to your call
          is there is example of ’tpl’
          create a new chunk e.g. "tabContriltpl" with this code:
          <ul class="tabs">
          [+tabs+]
          </ul>
          <div class="tabContent">
          [+content+]
          </div>

          and add parameter &tpl=`tabContriltpl` to your snippet call
            • 33172
            • 4 Posts
            Thanks a lot Sharkbait smiley

            It’s working perfectly as it works in your demo link
              • 26931
              • 2,314 Posts
              you’re welcome, glad i could help smiley
                • 1918
                • 2 Posts
                I’m having a really difficult time getting tabControl working. Here’s my page: http://tinyurl.com/y9tsb3o
                As you can see, the first tab’s content shows up, the links are working, but the display is not updating when you click other tabs. Is there something obvious I’m missing?

                Thanks,
                Adam
                  • 33172
                  • 4 Posts
                  Quote from: apitel at Feb 08, 2010, 03:45 PM

                  I’m having a really difficult time getting tabControl working. Here’s my page: http://tinyurl.com/y9tsb3o
                  As you can see, the first tab’s content shows up, the links are working, but the display is not updating when you click other tabs. Is there something obvious I’m missing?

                  Thanks,
                  Adam

                  I am also facing the same problem. Some time it works but not always. I think there is some problem in including javascript files using function like ($modx->regClientScript(’assets/js/jquery-1.3.2.min.js’); ) in snippet code.
                  Some time this code works and file get added in script tag but some times this code is not working and files not getting added in script tag.
                  I hope everyone understands my English.
                  Thanks
                  yogesh
                    • 33172
                    • 4 Posts
                    Quote from: yogesh at Feb 10, 2010, 04:28 AM

                    Quote from: apitel at Feb 08, 2010, 03:45 PM

                    I’m having a really difficult time getting tabControl working. Here’s my page: http://tinyurl.com/y9tsb3o
                    As you can see, the first tab’s content shows up, the links are working, but the display is not updating when you click other tabs. Is there something obvious I’m missing?

                    Thanks,
                    Adam

                    I am also facing the same problem. Some time it works but not always. I think there is some problem in including javascript files using function like ($modx->regClientScript(’assets/js/jquery-1.3.2.min.js’); ) in snippet code.
                    Some time this code works and file get added in script tag but some times this code is not working and files not getting added in script tag.
                    I hope everyone understands my English.
                    Thanks
                    yogesh

                    Hey
                    I got the solution.... my Friend helped me on this... Now my code works always
                    I include jquery.js before other jquery files and in tabcontrol.js file
                    I replace following code
                    jQuery(tabSelector+' a').each(
                    
                    		function(){
                    
                    			var href=String(jQuery(this).attr('href'));
                    			//alert(href);
                    
                    			var idPattern=/activeId=(\d*)/;
                    
                    			var id=href.match(idPattern)[1];			
                    
                    			jQuery(this).bind('click',id,requestUpdatedContent);
                    
                    			this.tabControlInstance=o;
                    
                    		}
                    
                    	);

                    With the code
                    $(document).ready(function() {	  	
                    	//alert(jQuery(tabSelector+' a').length);		
                    	jQuery(tabSelector+' a').each(
                    
                    		function(){
                    
                    			var href=String(jQuery(this).attr('href'));
                    			//alert(href);
                    
                    			var idPattern=/activeId=(\d*)/;
                    
                    			var id=href.match(idPattern)[1];			
                    
                    			jQuery(this).bind('click',id,requestUpdatedContent);
                    
                    			this.tabControlInstance=o;
                    
                    		}
                    
                    	);
                    
                    	});


                    Notice: I kept var o=this; outside the document.ready function
                      • 1918
                      • 2 Posts
                      Thanks for your help yogesh. I tried as you instruction, editing my tabcontrol.js file, however, I’m having the same results. Did you apply any additional fixes?