Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Here's book.module. All theme functions were converted but it may need some more work.
book_export_html(), book_node_visitor_html_pre() and book_node_visitor_html_post() have html in them that cannot be overridden. Should we break off some of these functions into template files too? And why is there a pre/post function for adding the html?
book_tree() and book_tree_recurse() uses theme functions for building lists now. It generated them manually duplicating some code. HTML is the same.
Comment | File | Size | Author |
---|---|---|---|
#19 | tplify-book.patch | 19.46 KB | chx |
#18 | tplify-book.patch | 13.17 KB | chx |
#14 | tplify_book.patch | 19.43 KB | chx |
#13 | tplify_book.patch | 31.23 KB | chx |
#10 | tplify_book.patch | 19.11 KB | chx |
Comments
Comment #1
rstamm CreditAttribution: rstamm commentedpatch doesn't apply anymore.
cvs id tags broken and missing blank line after cvs id tags.
Comment #2
dvessel CreditAttribution: dvessel commentedI'll have another patch soon. book.module was under heavy development after I made that patch.
Comment #3
dvessel CreditAttribution: dvessel commentedChanges:
This removes the need for the pre/post visit functions. It's now passed in as a child so it can be wrapped with "book_node_export". Not "book_node_visitor_html_pre" and "book_node_visitor_html_post". Those two had hard coded html. It was moved into theme_book_node_export.
Hard coded html removed from "book_export_html", moved into "theme_book_export_html".
Please don't forget about the search conversion.
http://drupal.org/node/164032
Comment #4
dvessel CreditAttribution: dvessel commentedIncludes the template files this time.
Comment #5
dvessel CreditAttribution: dvessel commentedRerolled for latest head.. /sigh.
Comment #6
dvessel CreditAttribution: dvessel commentedNote that the book sections don't put out the right classes anymore. Something was changed since the last patch so some nodes no longer contain the book depth.
Comment #7
Gábor HojtsyThe book split patch (I just committed) possibly broke this, as you noticed there.
Comment #8
dvessel CreditAttribution: dvessel commentedugh, I have less time now but I'll try to get another patch going soon...
Comment #9
Senpai CreditAttribution: Senpai commentedDvessel, keep trying to shoot that moving target, and PM me when a patch is ready for testing. I wanna see this get in.
Comment #10
chx CreditAttribution: chx commentedReroll.
Comment #11
catchThe back and up links are generating urls like node/node/3
everything else seems fine.
Comment #12
catch$variables['book_url'] = 'node/'. $book_link['bid'];
maybe the culprit?Comment #13
chx CreditAttribution: chx commentedA few url() calls were missed.
Comment #14
chx CreditAttribution: chx commentedSome menu stuff got into it.
Comment #15
catchFixes all the issues I found, RTBC.
Comment #16
dvessel CreditAttribution: dvessel commentedWoo hoo!! Nice guys, thanks!
Comment #17
AjK CreditAttribution: AjK commentedExport html gives me a wsod. function book_export_traverse() doesn't return it's carefully constructed $output. Am I missing something here?
Comment #18
chx CreditAttribution: chx commentedComment #19
chx CreditAttribution: chx commentedComment #20
AjK CreditAttribution: AjK commentedYup, looks good now.
Comment #21
PedroC-1 CreditAttribution: PedroC-1 commentedI am not sure but is the DOCTYPE in the first line of book-export-html.tpl.php?
Or is it better to write
instead of
in book-export-html.tpl.php
Comment #22
John Morahan CreditAttribution: John Morahan commentedNo,
?>\n
is equivalent to?>
- see http://www.php.net/manual/en/faq.using.php#faq.using.newlinesComment #23
Gábor HojtsyThanks, committed. (Although I corrected a coding style violation in book_theme)
Comment #24
(not verified) CreditAttribution: commentedAutomatically closed -- issue fixed for two weeks with no activity.