Not logged in. · Lost password · Register
Forum: General Help and Support Development RSS
DokuWiki Plugin get all namespace names
Avatar
TheKeymaster #1
Member since Jul 2017 · 14 posts
Group memberships: Members
Show profile · Link to this post
Subject: DokuWiki Plugin get all namespace names
Hello everyone,

I want to get the metadata of all pages with the function
p_get_metadata(ID)
.
But without the ID of all the pages I cant get the content of all pages.
Is there any way to get like an array where all names of DokuWiki pages are?

Thanks!
Avatar
TheKeymaster #2
Member since Jul 2017 · 14 posts
Group memberships: Members
Show profile · Link to this post
Please Note: I already tired $Doku_Indexer->getPages();, but this seems to also include removed pages. I only want pages that are available.
This post was edited on 2017-08-28, 17:51 by TheKeymaster.
Avatar
LarsDW223 #3
Member since Sep 2014 · 462 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
I think you can use the search() function in inc/search.php.
Avatar
turnermm (Moderator) #4
Member since Oct 2009 · 4785 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
In reply to post #2
   /**
     * Return a list of all pages
     * Warning: pages may not exist!
     *
     * @param string    $key    list only pages containing the metadata key (optional)
     * @return array            list of page names
     *
     * @author Tom N Harris <tnharris@whoopdedo.org>
     */
    public function getPages($key=null) {


The required key is 'description'.  I believe that only existing pages have a description.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-02-26, 15:35:23 (UTC +01:00)