https://bugzilla.wikimedia.org/show_bug.cgi?id=23297

--- Comment #3 from Neill Mitchell <mitchell_ne...@hotmail.com> 2010-05-24 
09:10:52 UTC ---
Hi.

Thanks very much for the information. I have found a non hacky way to do this
:)
You put the following in LocalSettings.php:

$wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfNavTree';
function wfNavTree() {
        global $wgUser, $wgTitle, $wgParser;
        if ( is_object( $wgParser ) ) $psr =& $wgParser; else $psr = new
Parser;
        $opt = ParserOptions::newFromUser( $wgUser );
        $nav = new Article( Title::newFromText( 'NavTree', NS_MEDIAWIKI ) );
        $out = $psr->parse( $nav->fetchContent( 0, false, false ), $wgTitle,
$opt, true, true );
        echo '</ul></div>' . $out->getText();
        return true;
}

You can then have a normal page called "NavTree" (in this example) with any
markup in you like. This includes SMW queries. They then appear in the sidebar.

So I do not think it will be a good use of your valuable time to implement a
hack in SMW.

Many thanks
Neill.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to