__UPDATE: Work continues on the wiki page set up for this project.
A modest proposal for this weekend's lesson.
One of the things mentioned by Dries in his "State of the Drupal" talk at OSCMS was how nice it would be if book.module would turn into a more generic outline functionality, rather than being semi-attached to a specific node type. I've had the same thought myself, and with the code-freeze for Drupal 6.0 coming up in June it's now or never to get new features in.
So I say lets do it. I'm willing to do the majority of the coding, and to package the whole experience into one or more dojo lessons. If others would like to contribute to the effort that's more than welcome. Does this sound like a good topic for at least one lesson?
Specific things that will be covered include:
- NodeAPI
- The new Drupal 6 menu system
- Interfacing with content-types in the style of CCK
- Crafting a svelt new outlining interface
- The community process for getting code into Drupal core
Notes/Resources:
http://drupal.org/project/outline
http://lists.drupal.org/pipermail/development/2007-March/023188.html
http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/pwolanin/test/
http://drupal.org/node/137767

Comments
I can dig it
Hey Josh!
I missed the State of Drupal talk, but this sounds like a cool idea. Wouldn't it effectively allow for a lot of the functionality of the Category module in the core of drupal? It would be important to be able to assign any page to this outline whether that page was created as a node, or a view or a panel ... at least to support the most common page types.
I've used Category module on other sites, where there was a need for highly structured content, but I must say I didn't like all the overhead, and the ability to restructure the outline in a slick interface would be awesome.
I'm swamped with three projects right now, so I won't be of much help in this. Sorry. But seeing how a ninja master like you would tackle this would be really educational.
Domo Arigato Sensei !
Hmmm....
I'll have to check out the category module. AFAIK the book module only supports nodes, not views and panels. It gets into tricky mushy territory trying to create outlines out of any possible path. Makes like the menu system.
However, I can totally see the utility of being able to insert views/panels "pages" into an outline along with regular drupal nodes. Perhaps some kind of outliner API...
http://www.chapterthreellc.com | http://www.outlandishjosh.com
https://pantheon.io | http://www.chapterthree.com | https://www.outlandishjosh.com
menu system integration
I'm working on patch making multiple menus possible with the 6.x menu- I'm also very mindful of the idea of integrating outlining with menus so I'm planning for there to be a way the book/outline module will be able to use the menu system to create real menus (not the current pseudo-menu block). Of course, the coding is far from done, but here's the basic idea (which has the support from Chx): the menu table will be split into 2 tables- {menu} and {menu_links}. The first will contain the actual module-defined callbacks and will be used for page serving. The second will contain all the links that may be displayed in the visible menus in blocks.
I think one critical need is indeed a better UI for moving posts within/between books. This is maybe a place for some nice jQuery- for example a collapsible tree representation like MODx uses? To pick a new parent, you just expand the tree and click on the new parent.
Note also that my sandbox code and the outline module were one and the same at one point, but my sandbox code represents more the direction i was thinking about for a very lean core module.
Sounds good
I spoke with chx about this briefly. We'll just coordinate as we go forward.
One thing: part of the value of having book stuff in the menu system is that a site navigation (primary, secondary links, breadcrumbs) can maintain a good trail. We should be sure to keep that kind of thing ins the {menu_links} functionality, not just blocks.
http://www.chapterthreellc.com | http://www.outlandishjosh.com
https://pantheon.io | http://www.chapterthree.com | https://www.outlandishjosh.com
thoughts on breadcrumb
I was thinking about this earlier (breadcrumb, etc). Perhaps this will require a way to give a weight to different menus? Otherwise, how will the menu system make a unique determination for the breadcrumb if the same path is a link in multiple menus?
That is an amazing
That is an amazing idea!
Another link for the Resources:
http://drupal.org/node/128731
State of Drupal
If you want to hear what Dries said about it, you can check out the video on google.
Anyway, this sounds like an awesome idea.
Holy rockin!
Josh that would be awesome! A great way to have the Dojo folks see what playing around with core is like ;-) and get a much, much needed feature moving forward again. I'm willing to help out wherever needed since this is an issue near and dear to me (as it should be for all documenters and folks who use the drupal.org handbooks.)
Learn Drupal online at Drupalize.me
josh_k++
A
W
E
S
O
M
E
Wow
Glad there's so much positive feedback. I'll have to start actually getting prepared. ;)
http://www.chapterthreellc.com | http://www.outlandishjosh.com
https://pantheon.io | http://www.chapterthree.com | https://www.outlandishjosh.com
Excellent
This is something I've been intending to do for a while now - glad I don't have to dive in at the deep end anymore! Excellent idea and I look forward to helping
http://www.geologyrocks.co.uk
http://www.geologyrocks.co.uk
cough
Perhaps you have seen this module: http://drupal.org/project/outline
It would certainly be good to get that more attention and more work towards making it core worthy, but no sense in repeating the work, right?
--
Knaddisons Denver Life | mmm Free Range Burritos
knaddison blog | Morris Animal Foundation
Thanks!
I wasn't aware of this module, nor did it come up in #drupal when I started talking about this idea. I'll definitely have to look at picking up this code.
http://www.chapterthreellc.com | http://www.outlandishjosh.com
https://pantheon.io | http://www.chapterthree.com | https://www.outlandishjosh.com
FWIW
This idea resonates me for several reasons:
A) I love the idea of a dojo lesson to 'bring it all together'. I tried to incorporate in my recent lesson a very concrete coding session and intend to (when I have time) commit the code generated there to cvs. This takes that oncept much further. I definitely think that it's high time we start getting hands on real life module building experience.
B) Something like this could help the handbook a lot. Case in point: add1sun has recently spent a large amount of time re-thinking how the videocasts section works. That could have been a LOT easier if we had a 'videocast' content type that could have been a 'book page' in its own right.
C) This plays into one of my pet issues here: http://drupal.org/node/5901 indirectly. The handbook is a bit of a winding maze and IMO shouldn't need to be hierarchical. Many drupal pieces fit into other drupal pieces, and trying to maintain the crosslinking is difficult. For example: right now all the doc on "Taxonomy" is split between "Drupal Terminology", "Basic Site Configuration", "Developing for Drupal" and more. In a better organized world, we would have one "Taxonomy" section that can 'parent' to many sections. Each area of drupal could be a specialized 'chapter' that could be outlined in a multple hierarchical fashion. We can do this with vocabularies now, but thats not enough for many things.
Tresler Designs
CNDP, LLC
multiple hierarchy navigation?
While having a single node or page in multiple hierarchies sounds good in theory, what sort of UI are you imagining for navigating this?
I suppose on option is to take a page from OG and keep track of your context in the session variable?
$_SESSION['og_last'] = og_get_group_context();Simpler than that.
There is actually a good deal of talk going on about what you are talking about in the issue mentioned elsewhere on this page.
I'm just alking about letting a page in a book belong to many books.
Right now, Make a book
BOOK A - for How to organize your site
--and pages
page A1 - Taxonomy
-------and sub-pages make chapters...
page A.1.a - heirarchical stuff
A.1.b - free-tagging
page A2 - Other way to organize your site
page A3 - yet another way to organize your site
But what happens when the same exact information is needed in another book elsewhere? We end up re-writing a book page in an effort to convey the same information in a way that makes it more relevant to others.
Book B - Drupal Terminology
page B1 - Taxonomy
-------and sub-pages make chapters...
page B.1.a - heirarchical stuff
B.1.b - free-tagging
page B2 - Other drupal term
page A3 - yet another drupal term
What would make sense to me anyway is if we could have one subsection .1.a with two parents. Thusly reducing the massive amount of updating of very similar handbook pages on D.O.and making the handbok easier to navigate. The idea is that by 'parenting' thing properly we can have the links at the bottom of a book just 'take you to what you need'.
____________BOOK1_____________________BOOK2_____________________
___________/________|___________________|______|________________________
__________/____________|_____________|_________|________________________
_______PageA_____________PageB__________PageC_______PageD______
Is better than:
____________BOOK1______________________BOOK2____________________
___________/________I___________________|______|_____________________
__________/___________|______________|_________|_____________________
_______PageA_____PageB______PageC___PageD______PageE______
When possible.
Tresler Designs
CNDP, LLC
multiple hierarchies are great - interface issues
Multiple hierarchies are great, allowing people to browse through related concepts very easily. This is the strength of tagging content instead of putting things in folders. It would be great if there were way to use a website outliner to specific multiple parents for a page. Here's some of the options to consider with the interface:
Keep the user in context to where they came from?
Once you start giving pages multiple parents, that means there's multiple pathways to get to the page (Book1 or Book2) each one generating a different set of breadcrumbs. Web pages typically have only one "home", so no matter how the user found the page, the TOC for Book1 will be displayed instead of keeping the user in the context of Book2 (if that's where they came from). That's because it requires tracking the users navigation history to reflect this, and this ends up being considered acceptable.
Show other parents so that user can navigate "upstream"?
One difficulty as pointed by pwolanin is figuring out an intuitive and attractive interface (something that won't be intimidating) I think the drupal handbooks have a very technical and computer savvy audience so it's not as touchy of a subject, but if we want this feature to be consumable on sites where people have less computer literacy, we'll need to have a decent default interface for navigating these hierarchies. Directories like dmoz have a similar issue. Here's what they do:
http://dmoz.org/Computers/Programming/Languages/PHP/Scripts/Content_Mana...
which has breadcrumbs like this:
» Computers » Programming » Languages » PHP » Scripts » Content Management
Suggests also seeing these other topics: (Allows user to go to parents)
» Computers » Graphics » Web » Templates
» Computers » Programming » Languages » PHP » Scripts » Frameworks
» Computers » Programming » Languages PHP » Tools
» Computers » Software » Internet » Site Management » Content Management
(The other links seen on the page are siblings and children)
Although just having outlining capability is very useful, adding the ability for administration to control features like this would make it more powerful.