We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42146
    • 73 Posts
    using http://foundation.zurb.com/docs/tabs.php#tabsCode with friendly urls i'ved tried all solutions in http://rtfm.modx.com/display/revolution20/Named+Anchor. even turned off freindly urls, and a blank htaccess same problem

    once i removed the line
    <base href="[[++site_url]]" />
    from template, then tabs worked.....

    so any downside to not having
    <base href="[[++site_url]]" />
    in your template?



    This question has been answered by multiple community members. See the first response.

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Yes. You will need to use absolute URLs for all of your image, .js and .css files.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 3749
        • 24,544 Posts
        I wonder if changing it to this would help:


        <base href="[[!++site_url]]" />

          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
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          No. The problem is with the Javascript implementation of handling the tab's content area. With a base tag, your URL is automatically completed by the browser using the base tag's href attribute. So your link to #tab1 becomes http://site_url/#tab1, and the javascript loads the whole page into the tab content area, instead of just the named element.

          This was a known bug in the JQuery UI tabs some years ago and was fixed; now it has regressed and is causing the same problem since JQuery UI version 9.

          Almost all of the JQuery tab plugins use the same general method - an unordered list of anchor links to make the "tabs", and a separate block of divs to contain the related blocks of content. When one of the "tab" links is clicked, the Javascript disables the normal function of an anchor link and instead loads the content of the target div into the tab's display container.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 3109 ☆ A M B ☆
            • 894 Posts
            Do you have a live link we can check?

            What you can try is using something like this on your tabs href:

            
            <a href="[[++site_url]]#tabID">Tab Label</a>
            
            


            That should get your tabs working like you want them to.

            Hope that helps.

            Quote from: jstump at Jan 25, 2013, 11:06 PM
            using http://foundation.zurb.com/docs/tabs.php#tabsCode with friendly urls i'ved tried all solutions in http://rtfm.modx.com/display/revolution20/Named+Anchor. even turned off freindly urls, and a blank htaccess same problem

            once i removed the line
            <base href="[[++site_url]]">
            from template, then tabs worked.....

            so any downside to not having
            <base href="[[++site_url]]">
            in your template?



            [ed. note: benmarte last edited this post 13 years, 8 months ago.]
              Benjamin Marte
              Interactive Media Developer
              Follow Me on Twitter | Visit my site | Learn MODX
              • 22303 MODX Staff
              • 10,725 Posts
              You can also solve this simply by changing the default link_tag_scheme in System Settings to full (and keeping the base tag).
                • 42146
                • 73 Posts
                Quote from: benmarte at Jan 26, 2013, 10:59 AM
                Do you have a live link we can check?

                What you can try is using something like this on your tabs href:

                
                <a href="[[++site_url]]#tabID">Tab Label</a>
                
                


                That should get your tabs working like you want them to.

                Hope that helps.


                that doesn't work, tried it. that is part of http://rtfm.modx.com/display/revolution20/Named+Anchor in how to get anchors working... i tried all examples with the <base href="[[++site_url]]" /> in template.

                Thanks susan for explaining why the issue is present.

                I'll try to get a live link, tonight or tomorrow, as i dont have time today for this, as i have to make a example page and put on a different site, as i cant show the site till ready, and it's offline....


                Quote from: opengeek at Jan 26, 2013, 12:18 PM
                You can also solve this simply by changing the default link_tag_scheme in System Settings to full (and keeping the base tag).


                i'll have to give this a try and see what happens.


                current link for anchor is [[++site_url]]/member-profile.html&userID=13#tab1 the user id number changes based upon what user you want to look at. putting user profile data into different tabs.


                with the base href off things work most times but then sometimes the url gets lost, and after clicking on a menu with a drop down (child), clicking on any other link then appends the page to the first url becomes something like this.... 41/41/41/41/41/41/41/41/online-users.html [ed. note: jstump last edited this post 13 years, 8 months ago.]
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Shouldn't that be ?userID=13
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 3109 ☆ A M B ☆
                    • 894 Posts
                    If @opengeeks suggestion doesn't work, you try something like this:

                    <a href="[[++site_url]][[*alias]].html?userID=[[+modx.user.id]]">Link Text</a>
                    


                    This will only work if the page has an html extension ad is passing the userID variable, otherwise modify it to match your needs.

                    Hopefully that helps, good luck.
                      Benjamin Marte
                      Interactive Media Developer
                      Follow Me on Twitter | Visit my site | Learn MODX
                      • 42146
                      • 73 Posts
                      Quote from: opengeek at Jan 26, 2013, 12:18 PM
                      You can also solve this simply by changing the default link_tag_scheme in System Settings to full (and keeping the base tag).

                      the when putting this setting to "full" (original value was -1) with <base href="[[++site_url]]" /> in the template,

                      tabs doesn't work but menu links are correct.





                      Quote from: benmarte at Jan 28, 2013, 07:26 AM
                      If @opengeeks suggestion doesn't work, you try something like this:

                      <a href="[[++site_url]][[*alias]].html?userID=[[+modx.user.id]]">Link Text</a>
                      


                      This will only work if the page has an html extension ad is passing the userID variable, otherwise modify it to match your needs.

                      Hopefully that helps, good luck.

                      well i get the proper link. ie http://xxxxx.com/member-profile.html?userID=13#simple3

                      but when clicking on tabs i nothing tabs, url in address bar does change.....


                      here are some live links.. i have made on another site, since the pages i'm actually trying to use the tabs on require a login.

                      http://betweenthewalls.biz/simple-tabs.html template with base href. no changes to the tabs code from http://foundation.zurb.com/docs/tabs.php#tabsCode
                      loads siteurl/#simple2 but does show the tab for a second before the wrong page loads

                      http://betweenthewalls.biz/simple-tabs2.html template with base href. using <a href="[[++site_url]][[*alias]].html#simple3"> url is correct, but the nothing tabs over when clicking on a tab. same happens when using all the tips from http://rtfm.modx.com/display/revolution20/Named+Anchor. correct url, but the tabs never work.

                      http://betweenthewalls.biz/simple-tabs3.html template with no base href no changes to the tabs code
                      it works as it should.

                      note the test link site is on modx2.0.5 it doesn't have the link_tag_scheme in System Settings option