1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Linking directly to Custom Profle Tab from External Page

Discussion in 'XenForo Development Discussions' started by Sadik B, Mar 4, 2012.

  1. Sadik B

    Sadik B Well-Known Member

  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The default profile tabs don't anchor either. I'm not sure how to implement this.
  3. Sadik B

    Sadik B Well-Known Member

    Yeah I spent 4 very frustrating hours trying to find a way before posting this. For the time being I have given up and have created an alternate page which has the same content as the profile tab and am linking from external places (like in alerts) to this page, while the profile tab is having the same content. Would be great to find out though...
  4. Fuhrmann

    Fuhrmann Well-Known Member

    Actually this is already present in XenForo 1.1.2. Take a look at this piece of code in xenforo.js:

    var useHistory = false;
                this.$tabContainer = $tabContainer;
                this.$panes = $($tabContainer.data('panes'));
                /*if (useHistory)
                        var $this = $(this), hrefParts = $this.attr('href').split('#');
                        if (hrefParts[1] && location.pathname == hrefParts[0])
                            $this.attr('href', '#' + hrefParts[1]);

    I just have erased the comments tags and set the useHistory to true and works fine. But I think there is one reason to this piece of code is commented:

    // var useHistory = XenForo.isPositive($tabContainer.data('history'));
                // TODO: disabled until base tag issues are resolved
  5. Rob

    Rob Well-Known Member

    If would be good if 1.3 got this working since I want to link directly to profile tabs
    Digital Doctor likes this.

Share This Page