Extension:Header Tabs/ko

미디어위키 확장 기능 매뉴얼
OOjs UI icon advanced.svg
Header Tabs
출시 상태: 안정
구현 파서 함수 , 사용자 인터페이스
설명 Displays top-level headers as JavaScript-based tabs
만든이 Sergey Chernyshev, Yaron Koren
최신 버전 1.1 (February 2016)
MediaWiki 1.17 or greater
데이터베이스 변경 아니오
라이선스 GNU 일반 공중 사용 허가서 2.0 or later
Version history
예제 Wiki of the Month on semantic-mediawiki.org
Header Tabs 확장 기능 번역 (translatewiki.net에서 가능한 경우)
사용법과 버전 매트릭스를 확인합니다.
Header Tabs 확장 기능 적용 모습
Header Tabs extension transforms top-level MediaWiki headers into tabs using the jQuery UI JavaScript library.


To enable tabs on a page after you installed the extension, you need to add a

<headertabs />

tag into the page in place where the last tab should end (everything below this tag will be shown under the tab view). Most of the time, though, you'll want to put it at the bottom of the page.

In addition to that, the page should have top-level headers defined in it like this:

= 헤더 제목 =

Each such top-level header, if it's anywhere above the <headertabs/> tag, will be displayed as a tab.

탭을 연결Edit

You can link to a tab, both from another page and from within that same page (and, within that same page, both from another tab and from outside the tab view). This is done using the {{#switchtablink}} parser function, which is called like this:

{{#switchtablink:탭 이름|링크 텍스트|페이지 이름}}

This will create a link to the tab with the name "Tab name", and the text of the link will read "Link text". If you want the link to a point to a tab on another page, you can optionally add the third parameter, "Page name".

주의 주의: Multibyte characters was well as formatting characters e.g. bold is not permitted if you want to link to tabs in any way.


탭보기 위에있는 일부 텍스트

= 첫 번째 섹션 헤더 =
이것은 첫 번째 탭에 표시됩니다.

{{#switchtablink:Second section header|다음 탭으로 이동하려면 여기를 클릭하십시오.}}

= 두 번째 섹션 헤더 =
이것은 두 번째 탭에 표시됩니다.

= 세 번째 섹션 헤더 =
탭보기 아래에 항상 표시됩니다.
왜냐하면 <headertabs/> 태그 아래에 있기 때문입니다.

머리글 제목은 자동으로 탭 제목으로 변환됩니다.


You can download the Header Tabs code, in .zip format, here.

You can also download the code directly via Git from the MediaWiki source code repository. From a command line, call the following:

git clone https://phabricator.wikimedia.org/diffusion/EHET/extension-headertabs.git

세 번째 섹션 헤드Edit

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

To view the code online, including the version history for each file, go here.


  • 파일을 다운로드해서, extensions/ 폴더 내의 HeaderTabs 이라는 이름의 디렉터리 내에 설치합니다.
  • 아래의 코드를 LocalSettings.php의 말미에 추가합니다:
    require_once "$IP/extensions/HeaderTabs/HeaderTabs.php";
  • Modify and configure as described in the following section
  •   완료 – 위키의 ‘Special:Version’에 이동해서, 확장기능이 올바르게 설치된 것을 확인합니다.


수정 스킨Edit

To change the tabs' styling, see "Skin modification".

구성 매개 변수Edit

The following parameters can be modified in LocalSettings.php below the require_once(...).


$wgHeaderTabsUseHistory defines whether tab navigation should be tracked within the browser history and within the URL, updating the hash value. By default this variable is set to true, i.e. history is used. You can disable it by adding the following:

$wgHeaderTabsUseHistory = false;


The $wgHeaderTabsRenderSingleTab variable defines if Header Tabs will activate if only a single top-level header is found. By default this variable is set to false, i.e. no tabs will be shown if only one top-level header is found. You can enable this behaviour by adding the following:

$wgHeaderTabsRenderSingleTab = true;


The $wgHeaderTabsAutomaticNamespaces variable defines the set of namespaces for which you don't need to add the <headertabs /> tag in order to enable tabs. If a namespace ID is defined in this variable, header tabs will activate automatically when you have two top-level headers (or one, if you have $wgHeaderTabsRenderSingleTab set to true) in an article. By default this variable holds no namespaces. You can add namespaces to this list by adding the following for each namespace:

$wgHeaderTabsAutomaticNamespaces[] = NS_MAIN;


The $wgHeaderTabsDefaultFirstTab variable defines whether Header Tabs puts any content before the first defined header and put it into its own tab. By default this variable is set to false. You can enable this behavior by adding the default name using the following:

$wgHeaderTabsDefaultFirstTab = 'DefaultTabName';

If using this setting, be careful not to enable $wgHeaderTabsRenderSingleTab as it will lead to tabs appearing in other parts of the UI.


The $wgHeaderTabsDisableDefaultToc variable defines whether Header Tabs will disable the MediaWiki article's table of contents (TOC) when tabs are enabled for a given article. This saves you the trouble of having to add __NOTOC__ to your article. If tabs are not enabled because of a lack of top-level headers, the table of contents will appear as usual. By default this variable is set to true, i.e. the MediaWiki TOC is disabled if header tabs are shown. You can disable this behavior by adding the following:

$wgHeaderTabsDisableDefaultToc = false;


The $wgHeaderTabsGenerateTabTocs variable defines if Header Tabs will try to generate a TOC for each tab. By default this variable is set to false, i.e. no tab TOCs will be generated. You can enable this behavior by adding the following:

$wgHeaderTabsGenerateTabTocs = true;


The $wgHeaderTabsEditTabLink variable defines if Header Tabs will add a edit link to the right of the tabs which let you edit only the tabs' text. By default this variable is set to true, i.e. a edit link for the tab will be shown. You can disable this behavior by adding the following:

$wgHeaderTabsEditTabLink = false;


The $wgHeaderTabsStyle variable defines what visual style is used for the tabs. By default this variable is set to 'large'. You can change the style by adding the following:

$wgHeaderTabsStyle = 'style-name';

Styles included with the extension are:

Name Description Screenshot
jquery MediaWiki가 제공하는 기본 스타일링 - 텍스트를 작게 만들고 검정색을 연결합니다.
large 기본 스타일. 텍스트를 보통 크기로 만들고 링크를 다시 파란색 (또는 빨간색)으로 바꿉니다.
bare "큰"스타일과 비슷하지만 대부분의 테두리와 배경색이 없으므로 페이지의 유일한 실제 변경 사항은 탭 자체입니다.

A wider selection of user-made styles as well as information about how to create your own styles is on our /Skin modification page.

버전 역사Edit

To see a list of changes for each version, see version history. For a list of features planned for future releases, please see roadmap.

Known limitations and issuesEdit

  • You cannot use the tag more than once. In other words, a second tag will not produce a second series of tabs.
  • Tabs render on top of infoboxes in Chrome.

Incompatible extensions and skinsEdit

Header Tabs does not seem to work when used alongside the following extensions:

  • MathJax - when the two are used together, it leads to faulty HTML, which results in a broken display in at least the Firefox web browser. (Things might have changed as MathJax has been updated.) You can disable MathJax on specific pages by adding __NOMATHJAX__.
  • AddThis (or the Widget version) - only the first tab is shown
  • FancyBoxThumbs - same as AddThis.
  • MobileFrontend- same as AddThis.
  • SectionHide - incompatible due to both extensions altering section behavior. SectionHide now includes an automatic check that will inform the user that the extension does not work with Header Tabs.
  • Echo - seems to cause display problems with Header Tabs.
  • Lingo - Lingo parser renders HTML page before Header Tabs is called; thus, Header Tabs can't find its keyword <headertabs/> anymore
  • Tweeki - Skin Tweeki breaks the layout and hide the text of the tabs

Sections appearing outside the tabbed sectionEdit

Header Tabs sections which include floated objects (such as infoboxes) may appear outside the tabs container if other content does not force the container to be large enough to hold the floated object. One resolution to this problem is to place a cleared html element at the very end of each section. A simple, but not best-practice, means of doing this is:

<div style="clear:both"></div>

This forces this element to be considered by the browser after your floated object and thus will grow the container to fit both.

Sites using this extensionEdit

See here for a list of wikis. If you use this extension, please add a link to your wiki at the bottom of this list.


The best way to seek help with this extension is to send questions the to mediawiki-l mailing list. The extension maintainers, and active users and contributors, are on this list and will be able to help you.

See alsoEdit