logo       

Re: have a "menu" on all pages?: msg#00081

web.wiki.phpwiki.talk

Subject: Re: have a "menu" on all pages?


Peter wrote:

Hi,

I would like to have a set of special pages on top of all pages. I do
it with copying that "header" to all wiki pages. Obviously this is not
very good, because if I want to change that "menu", I must touch every
single page I used it...

Is there a better way to get some kind of include("menu") on every
wikipage??? The menu-pages are wikipages themselves.


Thank you very much for your attention!

On Wednesday, December 17, 2003, at 09:29 am, Norberto Meijome wrote:

Hi Peter,
why not use templates? start off the default template and edit @ will.

making the menu part of the content of each wiki page is definitely the wrong way to go about it.

maybe there is a 'menu' plugin that can create this on parsing? or maybe an include plugin (not sure, haven't reviewed all the plugins available yet

Beto


Yes templates would be the best approach. Add a line into phpwiki/themes/default/templates/top.tmpl to call your menu template:

diff -U2 -r1.25 top.tmpl
--- top.tmpl 5 Mar 2003 21:38:15 -0000 1.25
+++ top.tmpl 17 Dec 2003 20:09:13 -0000
@@ -14,4 +14,5 @@
<!-- The top navigation/search bar -->
<div class="toolbar"><?= Template('navbar') ?></div>
+<div class="toolbar"><?= Template('menu') ?></div>
<?php } ?>


Then create a new file menu.tmpl, put your html and php in there, something like this:

<?php // -*-html-*-
$s = $Theme->getButtonSeparator();
?>
<!-- The menu bar -->
<?= WikiLink(_("RecentEdits"), "button") ?>
<?=$s?><?= WikiLink(_("MyPage"), "button") ?>
<?=$s?><?= WikiLink(_("AnotherPage"), "button") ?>
<!-- End menu bar -->

Carsten



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise