On Wed, 29 Mar 2006 11:20:17 +0200 Birger bweynants@gmail.com wrote:
Thanks a lot for the help! The hierarchical navigation bar is working now ;-)
While playing around with the menu, I encountered some strange behavior though:
- Whatever I put before the sublevel, is placed automatically above
the navigationbox. For example:
'sidebar' => '
- [[Mainpage|Main Page]]
- [[Special:Recentchanges|Recent Changes]]
- [[Current_events| News]]
- [[Help|Help]]
- Cases
** [[Technicalcase|Tcase]] ** [[Businesscase|Bcase]] ',
MediaWiki puts then the word "Cases" above the navigationbox. I have tried to put "*navigation" right above "* [[Mainpage|Main Page]] " but unfortunately this does not help. MediaWiki keeps putting the word that is placed right above the sublevel above the box. Why is this done automatically? How could i possibly change this?
You probably are still having this code: <h5><?php $out = wfMsg( $bar ); if (wfNoMsg($bar, $out)) echo $bar; else echo $out; ?></h5> The $bar variable comes from <?php foreach ($this->data['sidebar'] as $bar => $cont) { ?> and $this->data['sidebar'] comes from the old navigation parse system, which you don't want to use anymore.
What you can do is modify the <h5> line directly, like this: <h5>The Title I Want To Have Above The Box</h5>
This is not clean at all, but it's easy. If you want to do it more cleanly you can instead modify the sidebar-parser, which is the function buildSidebar() in includes/Skin.php
2. I wanted to make a second box beneith the navigation box andtherefore i had put <?php $this->msgWiki( 'sidebar' ) ?> <?php $this->msgWiki( 'casebar' ) ?> in monobook.php with 'casebar' => '
- Cases
** [[Technicalcase|Tcase]] ** [[Businesscase|Bcase]] ', Unfortunately, MediaWiki joins the two bars together into one box. Is it possible to create two separate boxes? I could separate boxes before (when i did not apply the hackhttp://meta.wikimedia.org/wiki/Layout_customization#How_do_I_add_an_editable_Left_Menu.3F), by just putting "*" before the word that had to appear above the box. I don't see how it is possible to figure that out while applying the hack...
In HTML code, a box looks like this:
<div class='portlet' id='p-just-on-or-another-id:'> <h5>The title above the box:</h5> <div class='pBody'> here the content of the box </div> </div>
In the non-hacked MonoBook, this HTML code is inside a loop, so generated multiple times if needed.
What you did is this:
<div class='portlet' id='p-just-on-or-another-id:'> <h5>The title above the box:</h5> <div class='pBody'> here the content of the first box here the content of the second box </div> </div>
What you need is this: <div class='portlet' id='p-just-on-or-another-id:'> <h5>The title above the first box:</h5> <div class='pBody'> here the content of the first box </div> </div> <div class='portlet' id='p-yet-another-id:'> <h5>The title above the second box:</h5> <div class='pBody'> here the content of the second box </div> </div>
ps: this is not 100% the exact code of MonoBook, more to give you the idea. If you can't find out how to change your MonoBook code it's maybe more usefull to paste the part of the code.
Succes,
Wilinckx.