[dokuwiki] Re: Global start page patch

On 28 December at 18:15, Anika Henke wrote:

> Hallo!

  Hello,


> >    With the patch applied and $conf['globalstart'] = 1 :
> >    ------------------------------------------------------------
> >      Requested page      Action     Target
> >    ------------------------------------------------------------
> >      id=                 Show       start.txt
> >      id=project/start    Show       project/start.txt
> >      id=project/         Show       project/start.txt
> >      id=project:         Show       project/start.txt
> >      id=project          Show       project/start.txt
> 
> Does that mean you could never have a target "project.txt" when there is 
> a subdirectory "project"?

  <advocacy mode="on">
  The "project" subdirectory is quite certainly a content holder for
  the docs about your "project", so what could be in "project.txt"
  file that would not better fit in "project/$conf['start'].txt" page?
  From what I have seen with wiki users they usually start working on
  a project.txt file when the page is going to be a single one, and if
  several pages will probably be needed, they want a project/ subdir
  to group their files there, instead of a bunch of project_index.txt,
  project_sponsors.txt, project_todo.txt, project_xxxx.txt files.
  </advocacy>
  
  Short answer: project.txt can still be created requesting id=.project

> What about empty subdirectories?

  io_sweepNS from inc/io.php should already delete them when you save
  any edited file.
  
> What about having already a file "foo.txt" and creating a "foo/bar.txt" 
> afterwards? Am I right that with your patch, you could never reach the 
> already written "foo.txt" again?

  Yes and no. If you create "foo/$conf['start'].txt", as the patch
  checks for $conf['start'].txt located inside subdirs, it will find
  it inside foo/ and thus it takes precedence over foo.txt. But you
  can still get foo.txt by requesting id=.foo or id=:foo (absolute
  path to the page foo.txt in the root namespace).

  I didn't want to make two patches, one for the $conf['start'] global
  behavior and one for the subdirs lookup because I thought it made no
  sense to use the subdirs lookup without the globalstart: lookup
  without globalstart would have meant that an existing subdir foo/
  would always take precedence over foo.txt file). 

  gb

-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: