The following warnings occurred:
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message



GetSimple Support Forum
How to get All Pages' slug - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Scripts & Components (http://get-simple.info/forums/forumdisplay.php?fid=11)
+--- Thread: How to get All Pages' slug (/showthread.php?tid=97)



How to get All Pages' slug - kumar - 2009-08-24

How do I can get all the page-slug of every page I have created?

I want to get even the pages that were not added to the menu.

which function to use?


How to get All Pages' slug - ccagle8 - 2009-08-24

<?php
$data = menu_data();
print_r($data);
?>


How to get All Pages' slug - kumar - 2009-08-25

<?php
$data = menu_data();
print_r($data);
?>

Can anyone write this code out to display as a Ul-Li list structure?

I'm little new to pHp ....thats why!


How to get All Pages' slug - StilgarBF - 2009-08-27

ccagle8 Wrote:<?php
$data = menu_data();
print_r($data);
?>

sure this works?
I only get the date of the current Page.


How to get All Pages' slug - kumar - 2009-08-27

hello stilgarBF

I have tried that code is working . I tried by putting as a component.

It output an array of the details of the pages but i couldn't make it as a UL list.

If you can do try and let me know.


How to get All Pages' slug - bnowell - 2009-08-28

Kumar, after you get the array back, YOU have to loop through it and build the unordered list / menu structure. Here is how I did it. I created a functions.php file in my theme folder and included it in my theme. Next, I put this function in my functions.php file.

Code:
function getMenu() {

    $data = menu_data();
    $output = array();

    $output[] = '<ul>';
    foreach( $data as $menu) {
        $output[] = "<li><a href='" . $menu['url'] . "' title='" . $menu['title'] . "'>" . $menu['title'] . "</a></li>";
    }
    $output[] = '</ul>';

    $menu_string = implode("\n", $output);
    echo $menu_string;
}

In my theme file, I added
Code:
<?php getMenu();?>

This isn't the only way to do it or even the best way, but it worked for me.

Regards,

Brian


How to get All Pages' slug - kumar - 2009-08-28

Hai bnowell

Thanks for your update. I'll try it out right now and let me respond you.


How to get All Pages' slug - ccagle8 - 2009-08-28

this is similar to this post: http://get-simple.info/forum/viewtopic.php?id=105

the menu_data() function is still in it's infancy, and may change slightly from what is currently distributed with version 1.5. I would be cautious where you use this function because of that. This is the only function in this stage as it was added in 1.5 with no intention of it being used - i just accidentally mentioned it in one post, and now it has taken off...