Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
page parent selector
#1
is it possible to do any of these fairly easily with the parent selector?

- use the name in dropdown, not the slug
- restrict available items
- only if the item is in menu
- or using custom field
Reply
#2
What exactly are you trying to do? You can grab the parents details from $pagesArray
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
(2013-03-27, 04:22:20)shawn_a Wrote: What exactly are you trying to do? You can grab the parents details from $pagesArray

I'm planing on having a lot of pages, most of which will be assigned to one of 5 parent items. Using the default function, I get a huge list of items, making it cumbersome to go through and select

Using the page title instead of the slug (while I know there are compelling reasons for using slugs) would look a little frendlier.
Reply
#4
Which function would that be? You can loop the page cache fairly quickly
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
(2013-03-27, 09:41:13)shawn_a Wrote: Which function would that be? You can loop the page cache fairly quickly

   

I'm not sure if we're talking about the same thing, I'd just like to select which pages can have items assigned as children. The pages that have children use a different template, so I might be able to sort them based on the template, but I don't want to hack the core if I don't have to
Reply
#6
I ended up just editing the edit.php page

added
Code:
if ($page['template'] == 'links.php'){
at 169 and the closing tag at 180[/quote]

PHP Code:
                        foreach ($pagesArray as $page) {
                            if (
$page['template'] == 'links.php'){
                                if (
$page['parent'] != '') { 
                                    
$parentdata getXML(GSDATAPAGESPATH $page['parent'] .'.xml');
                                    
$parentTitle $parentdata->title;
                                    
$sort $parentTitle .' '$page['title'];
                                } else {
                                    
$sort $page['title'];
                                }
                                
$page array_merge($page, array('sort' => $sort));
                                
$pagesArray_tmp[$count] = $page;
                                
$count++;
                            }
                        } 
Reply
#7
There is no function you have to loop the pagesArray yourself and check for parents. Of course if you are trying to do this bottom up it might be complicated and we have not added anything to easily do adjacency lists.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 4 Guest(s)