MediaWiki:MainPage

提供: 組込みシステム学講座
2017年11月1日 (水) 20:49時点におけるEslwebAdmin (トーク | 投稿記録)による版
ナビゲーションに移動 検索に移動

/* Change the main page url used in things like the logo to an absolute url */ $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfChangeMainPageURL'; function lfChangeMainPageURL( $sk, &$tpl ) { $tpl->data['nav_urls']['mainpage']['href'] = "http://www.your-desired-url.com/"; // Point the main page url to an absolute url return true; }

/* Change the main page url used in things like the logo to a url of another page on the wiki */ $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfChangeMainPageURL'; function lfChangeMainPageURL( $sk, &$tpl ) { $tpl->data['nav_urls']['mainpage']['href'] = Title::newFromText('ThePage')->getLocalURL(); // Point the main page url to a wiki page's url return true; }