[dokuwiki] Re: what is the startpage of a whole dokuwiki?
- From: Guy Brand <gb@xxxxxxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Wed, 22 Feb 2006 13:05:25 +0100
On 22 February at 08:33, peter pilsl wrote:
> When creating a new namespace - lets say "mystuff" - I usually start
> with creating a page mystuff.txt and then from this page link to
> subspaces in the new namespace like mystuff:chapter1.txt and so.
> I now realize that this is bad behaviour, cause the original mystuff.txt
> is not part of the mystuff-namespace but of the root-namespace.
>
> While this is merely a cosmetic-problem it doubles the effort for
> changing ACL on a namespace and so I'm left looking for a automagic
> solution that scans all my namespaces and subnamespaces and moves the
> corresponding equally named pages into the namespace itself (with the
> name of an startpage of this namespace) and update all links.
> If this is done, the original behaviour of the explorer in my
> lilas-template would make sense again. (although I will choose a
> different name than in $conf[start]
This is one of the reasons I'm using the small patch below. When
applied, the name specified with $conf[start] works on all the
namespaces, not only the root one. In your example, if you have
$conf[start]='index' then when moving files to the mystuff-namespace
the original mystuff.txt would be renamed mystuff-namespace:index.txt
and other mystuff related files would be moved to mystuff subdir.
BTW, renaming files preserving links is easy using Gary's pagemove
plugin (http://www.isection.co.uk/)
gb
diff -aur dokuwiki/inc/pageutils.php work/dokuwiki/inc/pageutils.php
--- dokuwiki/inc/pageutils.php Tue Nov 29 14:46:31 2005
+++ work/dokuwiki/inc/pageutils.php Sat Jan 28 20:21:13 2006
@@ -23,6 +23,13 @@
$id = $_REQUEST[$param];
+ //globalstart
+ if($conf['globalstart']) {
+ if((substr($_REQUEST['id'], -1) == "/") || (substr($_REQUEST['id'], -1) ==
":")) {
+ $id .= $conf['start'];
+ }
+ }
+
//construct page id from request URI
if(empty($id) && $conf['userewrite'] == 2){
//get the script URL
diff -aur dokuwiki/conf/dokuwiki.php work/dokuwiki/conf/dokuwiki.php
--- dokuwiki/conf/dokuwiki.php Sat Jan 28 12:11:53 2006
+++ work/dokuwiki/conf/dokuwiki.php Sat Jan 28 20:30:03 2006
@@ -17,9 +17,11 @@
$conf['savedir'] = './data'; //where to store all the files
$conf['allowdebug'] = 1; //make debug possible, disable after
install! 0|1
+
/* Display Options */
$conf['start'] = 'start'; //name of start page
+$conf['globalstart'] = 0; //is the start page global to all
namespaces
$conf['title'] = 'DokuWiki'; //what to show in the title
$conf['template'] = 'default'; //see tpl directory
$conf['fullpath'] = 0; //show full path of the document or
relative to datadir only? 0|1
- Follow-Ups:
- References:
- [dokuwiki] what is the startpage of a whole dokuwiki?
- From: peter pilsl
- [dokuwiki] Re: what is the startpage of a whole dokuwiki?
- From: peter pilsl
Other related posts:
- » [dokuwiki] what is the startpage of a whole dokuwiki?
- » [dokuwiki] Re: what is the startpage of a whole dokuwiki?
- » [dokuwiki] Re: what is the startpage of a whole dokuwiki?
- » [dokuwiki] Re: what is the startpage of a whole dokuwiki?
- » [dokuwiki] Re: what is the startpage of a whole dokuwiki?
- » [dokuwiki] Re: what is the startpage of a whole dokuwiki?
- » [dokuwiki] Re: what is the startpage of a whole dokuwiki?
- » [dokuwiki] Re: what is the startpage of a whole dokuwiki?
- » [dokuwiki] Re: what is the startpage of a whole dokuwiki?
- » [dokuwiki] Re: what is the startpage of a whole dokuwiki?
- » [dokuwiki] Re: what is the startpage of a whole dokuwiki?
- » [dokuwiki] Re: what is the startpage of a whole dokuwiki?
- » [dokuwiki] Re: what is the startpage of a whole dokuwiki?
- [dokuwiki] what is the startpage of a whole dokuwiki?
- From: peter pilsl
- [dokuwiki] Re: what is the startpage of a whole dokuwiki?
- From: peter pilsl