MediaWiki:Sidebar: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
$wgHooks['BeforePageDisplay'][] = 'wfAddSidebarTree'; | |||
function wfAddSidebarTree( $out, $skin ) { | |||
$title = Title::newFromText( 'SidebarTree', NS_MEDIAWIKI ); | |||
$article = new Article( $title ); | |||
$html = $out->parse( $article->getContent() ); | |||
$out->addHTML( "<div id=\"wikitext-sidebar\">$html</div>" ); | |||
return true; | |||
} | |||
{{#tree: | |||
*Wiki First Steps | *Wiki First Steps | ||
**Quicklinksmediawiki#Start_with_MediaWiki|Start With Wiki | **Quicklinksmediawiki#Start_with_MediaWiki|Start With Wiki | ||
Line 54: | Line 63: | ||
*TOOLBOX | *TOOLBOX | ||
*LANGUAGES | *LANGUAGES | ||
}} |
Revision as of 20:09, 24 July 2016
$wgHooks['BeforePageDisplay'][] = 'wfAddSidebarTree'; function wfAddSidebarTree( $out, $skin ) { $title = Title::newFromText( 'SidebarTree', NS_MEDIAWIKI ); $article = new Article( $title ); $html = $out->parse( $article->getContent() );
$out->addHTML( "
" );
return true; }
help