This is an enhancement to the process of editing book menus, so that menu links, page titles, and page ordering can be updated without marking the node itself as updated.

I created this because I use the book module on my site to build an index into existing site content to make it more easily discoverable for users. I'd already installed book helper to improve functionality, and it was an obvious base on which to develop this enhancement. The reason for not wanting to update the node timestamps is that a lot of the pages are forum posts, and marking them updated confuses them with posts that have actually had new comments added. It also triggers emails where users have subscribed to pages. This logic applies to all pages of course, but the nature of forum usage exacerbates the problem.

There are several distinct features:

In the book tab of node edit pages I have added a button "Update node titles". This will update the title links using the information entered in the tab without marking the node as changed. As an additional feature I've also added a "Remove from book" button, to provide complete functionality in this tab.

In the book ordering page, the "Save book pages" button applies the changes without updating the node. This includes the node title itself, provided the global book-helper settings are to not create a new revision. If a new revision is required, then updating the title will mark the node as updated. This seems logical to me, but the code could easily by modified to create the revision without updating the node. I don't have a strong feeling on this, as I always have new-revisions off.

The third change is the addition of a new VBO action called "Add to book". This performs the same action as the regular "Move to book", but again without updating the node. It also offers enhanced features, allowing the books offered at run-time to be configured at view-edit time, as well as the depth of pages offered.

I built this enhancement on top of my changes in issue 2921122, which must be applied first, otherwise the patch will fail.

I don't know how useful others will find this, all comments welcome! The entire functionality could be switched using configuration settings, maybe this is something I should add.

Comments

Rick J created an issue. See original summary.

rickj’s picture

Status: Active » Needs review
StatusFileSize
new16.23 KB

Patch file attached

rickj’s picture

StatusFileSize
new16.25 KB

Oops, the "Remove from book" button generated an error on new nodes. Updated the patch to fix.

  • Rick J committed 5a9addc on 7.x-1.x
    Issue #2921344 by Rick J: Change to avoid marking nodes changed,...
rickj’s picture

Status: Needs review » Fixed

Rolled into 7.x-1.0-beta3+12-dev

rickj’s picture

Status: Fixed » Closed (fixed)
rickj’s picture

Assigned: rickj » Unassigned