may i know how can i configure so that i have a page similar to the handbooks main page?
http://drupal.org/handbooks

Comments

Jeffrey04’s picture

sorry for the double posting....
after posting the first one i received a 500 error, and then i posted the topic again without knowing the previous one got posted to the forum already.

vm’s picture

sepeck’s picture

That's a page type content node. It has a php snippet that parses the 5 books that comprise the handbook. It grabs the top level nodes of each book and shoves them through a script. The columns are done through css

p>The Drupal handbooks offer a reference for those interested in Drupal, both novice and experienced Drupal administrators, Drupal users and Drupal developers.  Code documentation generated from the source code can be found on <a href="http://api.drupal.org/">api.drupal.org</a></p>
<p>Each handbook  is &copy; copyright 2000-2007 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0.  All content is supplied by volunteers, please <a href="/node/23743">contribute where you see a need</a>.</p>
<?php
// Book nids and their titles
$books = array(1 => "About Drupal", 258 => "Installation and configuration", 257 => "Customization and theming", 316 => "Developing for Drupal", 14279 => "About Drupal documentation");

foreach ($books as $nid => $title) {
  print '<h2 style="clear: left;">'. l($title, 'node/'. $nid) .'</h2>';
  // Fetch first level children
  $result = db_query("SELECT DISTINCT b.nid, n.title FROM {book} b INNER JOIN {node} n ON b.vid = n.vid WHERE b.parent = %d AND n.moderate = 0 AND n.status = 1 ORDER BY b.weight ASC", $nid);

  // Output pretty two-column list
  $half = ceil(db_num_rows($result) / 2); $i = 0;
  $section = '<div class="column-left"><ul>';
  while ($page = db_fetch_object($result)) {
    $section .= '<li>'. l($page->title, 'node/'. $page->nid) .'</li>';
    $i++;
    if ($i == $half) { 
      $section .= '</ul></div><div class="column-right"><ul>';
    }
  }
  $section .= '</ul></div>';
  print $section;
}

/*
<ul>
  <li><a href="about">About Drupal</a></li>
  <li><a href="node/258">Installation and upgrading</a></li>
  <li><a href="node/257">Configuration and customization</a></li>
  <li><a href="contributors-guide">Developing for Drupal</a></li>
  <li><a href="node/14279">About Drupal documentation</a> </li>
</ul>
*/
?><br class="clear" />

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

Jeffrey04’s picture

thanks for the reply, got so confused about the book and taxonomy concept :D