Adjust header tags (<h1>, <h2>, etc.) to maintain structure when creating the print-friendly version

Trejkaz - November 4, 2009 - 23:35
Project:Drupal
Version:6.x-dev
Component:book.module
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

I created a print-friendly version of a page which had child pages, and noticed that the child pages' page titles were all

still. This becomes a problem when you use some other tool to create a table of contents, as it sees that the child pages are at the same level as the parent page and thus cannot nest them inside it.

Ideally I would like it to work such that the header tags are adjusted to higher numbers depending on the level of nesting. So for instance, an

on a page which is 2 deep from the starting page, should become

in the output.

Page authors would still be expected to realise that using

within pages themselves will only work well for "leaf" pages, of course.

#1

Trejkaz - November 4, 2009 - 23:36

Damnit, I didn't realise it was going to interpret everything as raw HTML... and I can't edit the body either. :-(

#2

jcnventura - November 10, 2009 - 17:36
Project:Printer, e-mail and PDF versions» Drupal
Version:6.x-1.x-dev» 6.x-dev
Component:Code» book.module

The printer-friendly pages content is generated by Drupal core's book module. This needs to be fixed there.

 
 

Drupal is a registered trademark of Dries Buytaert.