Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get content published in other page
#14
@webquadro: Thank you for the submenu function. I had some trouble with the list. Code was not valid. Fixed it like this:
Code:
//****************************************************//
//** FUNCTION: get_subpages()                       **//
//**                                                **//
//** Function to display subpages.                  **//
//****************************************************//
function get_subpages($parent) {
    $data = menu_data();    
    $parent = $parent . "/";
    $output = array();

    foreach( $data as $menu) {
        if ($menu['parent_slug'] == $parent){
            $output[] = "<li><a href='" . $menu['url'] . "' title='" . $menu['title'] . "'>"
                                                    . $menu['title'] . $menu['parent'] . "</a></li>";
        }
    }
    
    $menu_string = implode("\n", $output);
    if ($menu_string != "") {
    echo "<ul>".$menu_string."</ul>"; }
    }
Simplify, optimize, minimalize but keep the core.
Reply


Messages In This Thread
Get content published in other page - by Soueb - 2009-08-19, 00:11:54
Get content published in other page - by ccagle8 - 2009-12-14, 12:09:24
Get content published in other page - by focoves - 2009-12-16, 05:59:36
Get content published in other page - by focoves - 2009-12-19, 02:11:25
Get content published in other page - by melmoth - 2010-02-04, 22:03:52
Get content published in other page - by melmoth - 2010-02-05, 21:41:03
Get content published in other page - by melmoth - 2010-02-10, 19:32:26
Get content published in other page - by Philipp Speck - 2010-02-23, 19:12:44
Get content published in other page - by geggal - 2010-09-28, 05:30:45
Get content published in other page - by geggal - 2010-09-28, 06:04:57
Get content published in other page - by geggal - 2010-09-28, 06:35:27



Users browsing this thread: 1 Guest(s)