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 foundsearch_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. Best regards, Ferdinand Soethe
Do you need search?The answer to your question as asked - how to test for the existence of a page - is:
best: resolve_pageid(); simple: file_exists(wikiFN());both functions are part of inc/pageutils.php. You'll need to check there for details of parameters, return values, etc.
For details of the search call back functions (e.g. search_pagename) read the comments at the top of the file (inc/search.php).
- Chris -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist