GetSimple Support Forum
menu-manager.php tag childpages - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8)
+--- Thread: menu-manager.php tag childpages (/showthread.php?tid=4281)



menu-manager.php tag childpages - uitdecom - 2013-02-10

Just a little tweak to make the menu-manager (admin backend - drag and drop menu order) look a little bit more organised by giving all childpages a 'hasparent' class.

changed the following in menu-manager.php on line 66:

Code:
if ($page['parent'] != '') {
                    echo '<li class="clearfix hasparent" rel="'.$page['slug'].'">
                                            <strong>#'.$page['menuOrder'].'</strong>&nbsp;&nbsp;
                                            '. $page['menu'] .' <em>'. $page['title'] .'</em>
                                        </li>';
                                        }
else {
                    echo '<li class="clearfix" rel="'.$page['slug'].'">
                                            <strong>#'.$page['menuOrder'].'</strong>&nbsp;&nbsp;
                                            '. $page['menu'] .' <em>'. $page['title'] .'</em>
                                        </li>';
                                        }

Now the menu-items with a parent can be styled differently (for example I've set a margin-right on li.hasparent strong, so every childpage has an indent)

Perhaps someone can simplify the code a bit, and have a look if it has any side effects?


RE: menu-manager.php tag childpages - mvlcek - 2013-02-10

(2013-02-10, 00:54:02)uitdecom Wrote: so every menu-item with a parent gets a hasparent tag and can be styled differently (I set a margin-right on the li.hasparent strong }

Why would you need this? You can just use CSS like this:
Code:
ul.menu li { /* styles for top level */ }
ul.menu li li { /* styles for children */ }
ul.menu li li li { /* styles for 3rd level entries */ }



RE: menu-manager.php tag childpages - uitdecom - 2013-02-10

There are no nested lists in the drag and drop menu-manager in the admin/backend.

This is just to make it a bit clearer to see what is a child page and what isn't.