Hi,

how can I show a list of orphan book pages ?

In D5.x there was a "administer > content > books > orphan pages", which showed me all the book pages which where not attached to a book.
It had a corresponding function book_admin_orphan which could be used in a block.
In D6.x there seems to be no such function any more.

I've tried to assemble a view with a filter
Node: Type = Book page
Book: Depth = 0

This does not work. I can add Book: Depth to the fields list and it shows 0 for all orphan pages, but I can't filter by that value.

Thanks

Comments

Andreas Wolf’s picture

Here is the export of a basic view showing orphan book pages.

$view = new view;
$view->name = 'Orphan_book_pages';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('relationships', array(
  'bid' => array(
    'label' => 'Book',
    'required' => 0,
    'id' => 'bid',
    'table' => 'book',
    'field' => 'bid',
    'relationship' => 'none',
  ),
));
$handler->override_option('fields', array(
  'title' => array(
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'book' => 'book',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
  'depth' => array(
    'operator' => 'empty',
    'value' => array(
      'value' => '0',
      'min' => '',
      'max' => '',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'depth',
    'table' => 'book_menu_links',
    'field' => 'depth',
    'relationship' => 'bid',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('items_per_page', 0);