Talk:Dynamic Page List
hello,now i want to adust my wiki navigation bar like this, having a treeview,but i don't know how to do it? can you help me? thank you very much!
Reply
- please put a signature under your contributions.
- install the treeview extension
put the following into your LocalSettings.php
# Treeview require_once( "$IP/extensions/Treeview/Treeview.php" ); $wgTreeViewImages = array( 'plus' => "Plus.gif", 'minus' => "Minus.gif", 'opened' => "Folder_opn_sml_blu.gif", 'closed' => "Folder_sml_blu.gif", 'doc' => "Doc-icon.gif", 'spacer' => "Blank.gif", 'vert' => "Vertline.gif", 'node' => "Node.gif", 'lastnode' => "Lastnode.gif", ); #$wgTreeViewShowLines = true; // we added a new hook to skins/Monobook.php at the top of the sidebar $wgHooks['MonoBookTemplateSidebarBegin'][] = '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')); $out = $psr->parse($nav->fetchContent(0,false,false),$wgTitle,$opt,true,true); //echo '</ul></div>'.$out->getText(); echo $out->getText(); return true; }
and change Monobook.php:
You must add the following line
<?php wfRunHooks( 'MonoBookTemplateSidebarBegin', array( &$this ) ); ?>
directly before this (existing) line
<?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>
Finally you should add this line to Mediawiki:Common.css
#p-navigation { display:none }
Then write your tree into the Document "NavTree"
Gero 20:25, 14 December 2007 (CET)
includematch
Hi!
I want to select pages which contains 'hello world' in Example chapter. As i understand 'includematch' can help me, but i don't understand how to make it... I tried to paste expression from examples and always got PHP errors (about delimiter or offset). I just want to select pages which contains 'hello world' to add them to the table. What do i need?
--Maaboo 13:33, 24 April 2009 (UTC)
Reply
We create a table of countries and show the chapter on 'Religion':
Content page | Religion |
---|---|
DPL Example 007 main page 1 | |
Nigunda |
some facts about religious groups in Nigunda; some other facts about religious groups in Nigunda; |
Nigunda Test |
some facts about religious groups in Nigunda; some other facts about religious groups in Nigunda Test; |
Somango |
some facts about religion in Somango |
Now we select only those articles where the word 'groups' occurs:
Content page | Religion |
---|---|
Nigunda |
some facts about religious groups in Nigunda; some other facts about religious groups in Nigunda; |
Nigunda Test |
some facts about religious groups in Nigunda; some other facts about religious groups in Nigunda Test; |
Gero 05:48, 26 April 2009 (UTC)