We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22609
    • 9 Posts
    Great Snippet!
    There seems to be an issue when a page has chunks or snippets. All it outputs is the code for the snippet or chunck ex:

    Content...
    [[nameofsnippet]]

    Am I missing something?

    Thanks in advance
      • 27140
      • 7 Posts
      Hi, everybody!

      I heavily changed tabControl and new version of tabControl snippet for MODx is ready
      I suppose now it should be much easier to integrate and customize it.
      Also history is enabled at last.

      Here is the changelist:

      • Customization of user events that triggers change of active tab is enabled
      • Ajax history enabled (when using ’click’ event)
      • Multiple instances of tabControl could be presented on a single page
      • Now uses jQuery plugin to initialize tabControl
      • Now can use several parents to collect tabs
      • Animation of changing tabs can be customized
      • Now uses xhtml valid links if it’s enabled in MODx configuration
        Regards,
        Vladimir Shugaev
        • 4310
        • 2,310 Posts
        Looks good, nice work Vladimir smiley
          • 29076
          • 615 Posts
          Thank you very much for tabControl. I’ll need it’s functionality and I will try it out to morrow. laugh
            I think, thererfor I am! But what I am, and why...?
            • 29076
            • 615 Posts
            Any chance you will get this to work for revolution 2.1.1 as well? Please! smiley
              I think, thererfor I am! But what I am, and why...?
              • 27140
              • 7 Posts
              Here is the way to get AJAX tab for Revo
              http://rtfm.modx.com/display/revolution20/Loading+Pages+in+the+Front-End+via+AJAX+and+jQuery+Tabs

              But if similar to tabControl solution would be useful for somebody I’ll try to get some time to transfer it to Revo
                Regards,
                Vladimir Shugaev
                • 18331
                • 20 Posts
                Hey,

                First of all thanks for a wonderfull snippet! I’m using it without ajax, only to manipulate content at the bottom of the page. However have one problem. I needed to put the anchor to the URL. So I modified this line in snippet by adding #anchor:

                $config['tabTpl']=issetOr($tabTpl,'@CODE: <li [+class+]><a href="[+url+]#myanchor">[+pagetitle+]</a></li>');
                


                So I got this: http://www.domain.com/page?tabCtr[click]=5#myanchor

                Everything works fine. The only problem - it’s not working when I put <base href="[(site_url)]"></base> to head.

                So NOW I got this: http://www.domain.com/page#myanchortabCtr[click]=5

                Any ideas how to fix it when using with base href? Thanks!