Extension talk:Header Tabs

Jump to: navigation, search

About this board

Old messages from this page are archived.

Wolcott65 (talkcontribs)

I know that I can call a specific portion on a page by adding a # after the page name [[page#anchor_name|shown_up_as]]. It doesn't seem that I can call a specific portion of a page that is within a header tab from another page via a switchtablink.

This post was posted by Wolcott65, but signed as Wolcott.

Sergey Chernyshev (talkcontribs)

No, you can't - it's not that smart, unfortunately.

Wolcott65 (talkcontribs)


What in your opinion is the hardest part?

  • The API to define the URL, which should just be a modification to the switchtablink parser.
  • The interpretation of the URL with two # symbols embedded.


I was looking through the extension to understand the code. Is there any hope that the functionality could be accomplished? I would be willing to spend a weekend to really understand the code and attempt a modification, but if you think that it is not worth it I won't waste my time.

Header Tabs is awesome, but I would love to keep the basic functionality of being able to jump to an anchor point on a page while that page is being shown in a header tab.

This post was posted by Wolcott65, but signed as Wolcott.

Joshkking (talkcontribs)
I second the desire for this if possible. Especially since it seems that switching tabs doesn't bring you back to the top of the page. This is a bit of an issue if you place a switch tab link anywhere far enough that the user has scrolled down some.
Joshkking (talkcontribs)

By the way, I used:

// Scrolls to the top when using switchtab parser with appropriate class since it doesn't natively
(function () {
function toTop() {window.scrollTo(0, 0);}

var TabSwitch = document.querySelectorAll(".tabLink");
var i;
for (i = 0; i < TabSwitch.length; i++)
 TabSwitch[i].onclick = toTop;


in my common.js file to make my switchtab parsers jump back up when clicked. Should work for anyone else also, though granted there's better ways to go about it (but I needed a script running anyways) :)

Mortalites (talkcontribs)

I just stumbled on this and I desperately would like to figure out how to Call an anchor on a Header Tab page. I also use Header Tabs further down on pages and when I link to the Tab it takes me to the top of the linked page. It doesnt link to the correct Tab but I cant see it unless I scroll down. Its probably frowned upon but I would literally pay to have this functionality in Header Tabs.

Reply to "Calling and anchor on a header tab page"
Summary by Kghbln

1.2 of 2017-07-19

Kghbln (talkcontribs)

I think moving to Resource Loader which was improved for the extension since the last release will bring a world of good performancewise. So it will be cool to have a new release which officially brings this improvement.

Yaron Koren (talkcontribs)

Yes, that's a good idea - I hadn't realized how long it has been since the last release.

Betmidrash (talkcontribs)

Hello, can I add a new namespace to the pages, like talk namespace, and to call it 'draft'. But I want it to be in a new tab like the tab 'discussion', near the page. Actually, maybe I don't need a new namespace, just a new tab, but not like here or here, because it made the tab inside the page, I want it in the head of the page, near the discussion tab. someone?

Yaron Koren (talkcontribs)


This is the wrong place to ask this question, since it does not relate to the Header Tabs extension. However, if you want to do this, I think the easiest way is to modify the skin, to add another tab to it. If you need more help than that, I would suggest writing to the mediawiki-l mailing list.


Betmidrash (talkcontribs)

Thanks. I really need more help. I'm a new user on wiki, and I don't understand what do you mean 'to modify the skin'.

Can you send me the link, where I need to ask my question?

Yaron Koren (talkcontribs)

Here is information about the mailing list: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply to "A new tab"
JosefAssad (talkcontribs)

I'm seeing a strange issue; I have a template with headertabs in it. In one of the tabs, I'm placing a call to an external PosegreSQL database using Extension:External Data . The ExternalData call uses a couple of template parameters to determine which table to query.

The ExternalData call generates a list of columns in the table specificed. It works fine if I move it outside the headertabs, but if it's inside it is just empty.

I'm at a bit of a loss; any clue why this might be happening?

Reply to "ExternalData calls in headertabs"

Issue Using https://www.mediawiki.org/wiki/Extension:Header_Tabs#Example

Flayckz (talkcontribs)


im Using Wiki 1.28 and the appropriate version of headerTabs : HeaderTabs: (REL1_28 2016-11-18T19:07:46 9ebb9c2)

My sourcecode for the page :

Some text above the tab view

First section header

This will be displayed on the first tab{{#switchtablink:Second section header|Click here to go to the next tab...}}

Second section header

This will be displayed on the second tab{{#switchtablink:Third section header|Click here to go to the next tab...}}

Third section header

This will be displayed on the third tab{{#switchtablink:First section header|Click here to go to the first tab...}}


Fourth section header

This will be always displayed under the tab view because it's below the headertabs tag.

appens when I click on one of the switchtablinks The console throws the following error :

Uncaught TypeError: Cannot read property 'Second_section_header' of undefined

   at HTMLAnchorElement.eval (eval at <anonymous> (load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1utpy7x:4), <anonymous>:112:315)
   at HTMLAnchorElement.dispatch (load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1utpy7x:65)
   at HTMLAnchorElement.elemData.handle (load.php?debug=false&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1utpy7x:60)
Reply to "Issue Using https://www.mediawiki.org/wiki/Extension:Header_Tabs#Example"
Jlemley (talkcontribs)

When transcluding a page with tabs, the edit section link above the tabs tries to edit the current page instead of the original. I'm on the latest version of HeaderTabs with wiki 1.23, and also reproduced it on Wiki 1.27.

Reply to "Edit Section Link on Transcluded Page"

New design idea; include hamburger - or tri-colon button for display on smaller devices

Albert Ke (talkcontribs)

Hi Yaron,

This is not an error, HeaderTabs has been working for me for many years, so thank you for that! This is more a design issue as more and more people start reading websites on small devices like smart phones. As far as I know it is currently not possible to have HeaderTab configured such that on small devices a hamburger or tri-colon button would appear to minimize the tabs to a dropdown menu such that each tab still can be selected, also on small devices to get to part of the text. Has this come up earlier (couldn't find it here) and is this something you like to consider including in upcoming versions?

Thanks, --Albert Ke (talk) 17:56, 12 January 2017 (UTC)

Yaron Koren (talkcontribs)

Oh, that's interesting. Would this be done in Header Tabs, or in the skin? I have no idea how one would go about doing this.

Albert Ke (talkcontribs)

Good question, not sure where this would be rendered. I'm testing the chameleon skin which works with bootstrap3.0 that has this functionality in the top nav bar (http://csdms.colorado.edu/mediawiki-beta/index.php?title=About_CSDMS). Anyway, food for thought. --Albert Ke (talk) 19:15, 12 January 2017 (UTC)

Reply to "New design idea; include hamburger - or tri-colon button for display on smaller devices"
GregRundlett (talkcontribs)

I'm using MW 1.26 with Lingo installed (via composer) and HeaderTabs is working for me. (e.g. https://freephile.org/wiki/MediaWiki/Auth). The page says it doesn't work with Lingo. I didn't want to edit the page based on a sample size of 1, but perhaps the incompatibility is a thing of the past.

Also, one quirk I noticed is that I had to explicitly add __NOTOC__ on a sub-page despite the default / explicit

$wgHeaderTabsDisableDefaultToc = true; // default true

in LocalSettings.php

Reply to "Works with Lingo for me"

TOC hide/show missing + TOC not created on template within tab

MattWallner83 (talkcontribs)

Hi I found an issue related to this one, in my case the table of content has to be shown in the tabs as I work with huge pages and loads of content.

$htGenerateTabTocs = true;

The problem I encounter is, that the [hide] link for the Table of content box only shows on the first tab but not on the following ones.

So on the first tab where the TOC is created, I can use the hide/show link, the collapse option, on the following ones where the TOC is shown, this link is not visible but would be needed as well.

Hope my explanation makes sense, I can't link the page as it's an internal one.

In addition, if I use a template page inside a tab with several headers, the TOC is not created at all... the TOC shows in the template page itself as well on any "tab-less" page I include it on, but not on the page I included it under a tab.

Any chance this can be fixed or is it an issue with my wiki version: 1.20.5? Can't change it though as I'm not the sys admin.

Thanks Matt

Potrod (talkcontribs)

It looks like the issue where the "hide" button only appears on the first tab's table of contents is still there. I'm using MW 1.27.1 and HeaderTabs 1.1.

$htGenerateTabTocs = true;

I have the same issue. I think it's a bug.

Reply to "TOC hide/show missing + TOC not created on template within tab"
Joshkking (talkcontribs)

Anyone know a way to throw an infobox onto a page with headertabs without having to copy it into each tab? Currently this works fine for me by duplicating the infoxbox into each section, but it's redundant code and will limit me if something in the infobox needs to be instanced only once.


Nakohdo (talkcontribs)

I'd try putting the infobox outside the <headertabs /> section and use CSS to position it.



Reply to "An infobox across all tabs?"