[dokuwiki] Re: Testing for existence of a page

  • From: Michael Klier <chi@xxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 31 May 2007 18:03:28 +0200

Ferdinand Soethe wrote:
> I'm deriving an extended TOC-Plugin for arctic from Ginas code and I'm
> stuck with the simple task of testing for the existence of a page.
> 
> I found
> 
> > search_pagename(&$data,$base,$file,$type,$lvl,$opts)
> 
> but no examples of how to use it.
> What params do I need to test if a page bla:blobb exists?
> 
> Any hints or examples much appreciated.

The arctic template just copies the html_index function but uses a
slightly different callback function to build the index. If you like to
surpress the :start links (I assume that`s what you`re up to ;)) in the
index you only need to add another if condition to _html_list_index() in
the tpl_functions.php (at line 295) and test if $item['id'] contains
:start.

HTH
chi

-- 
Michael Klier

mail:   chi@xxxxxxxxxxx
www:    http://www.chimeric.de
icq:    206179334
jabber: chi@xxxxxxxxxxxxxxxxxx
key:    http://downloads.chimeric.de/chi.asc
key-id: 0x8308F551

Other related posts: