The following warnings occurred: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
|
Way to get List of all the Pages in a plugin? - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16) +--- Thread: Way to get List of all the Pages in a plugin? (/showthread.php?tid=477) |
Way to get List of all the Pages in a plugin? - juliancc - 2010-03-06 I need to list all the pages available in the plugin page I'm creating. I was wondering if there is a method available that will return an array with all the pages?. Thanks! Way to get List of all the Pages in a plugin? - Zegnåt - 2010-03-06 menu_data(), maybe, otherwise I don’t think there is any function. Or you could check how pages.php lists all pages? Way to get List of all the Pages in a plugin? - juliancc - 2010-03-06 I tried menu_data() and breaks the code. As you suggested I went to the pages.php and looked at how it lists the pages there. I ended up copying some code and turned it into a function: Code: function getPages() I think if you guys include this into a global/common functions, then It can be useful for other plugin developers. Way to get List of all the Pages in a plugin? - Zegnåt - 2010-03-06 That’s pretty much the content of menu_data(), are there any errors that could give an indication of why menu_data() breaks your plugin? Maybe menu_data() is not accessible on the admin-pages and we should make it accessible… Way to get List of all the Pages in a plugin? - juliancc - 2010-03-06 I Get Fatal error: Call to undefined function menu_data() in ..... Yeah it would be great if such a function could be available in the admin pages.. Not sure if I would want to call it menu_data(), I would think get_pages() or get_available_pages() more suitable. Thanks for all your help! |