I am setting up a website for an open source project, with an online user guide.
The site needs to host multiple user guides for different versions of the software (similar to Drupal, not everyone will instantly switch to the next version the day it is released - older versions ofthe documentation need to be available, at the same URL, long after they have been superceded). My plan is to have a separate Book for each version of the user guide.
The user guide will be quite big (hundreds of pages), and 90% identical between versions, so I am planning to use Book Copy to create the each new user guide from the last one.
But I also need to do a global search and replace to fix up internal links so that the new user guide points to its own pages and images.
node_find_replace seems to only do a site global find/replace, I need a book wide find/replace.
Any suggestions? This seems like it ought to be a fairly common requirement. Am I solving it the wrong way altogether?
Martin
Comments
How do you administer your
How do you administer your database? If you use phpMyAdmin, it has a search feature that will search tables or even the whole database. You can use that to see where you have outdated links, and then use a query to find-and-replace in the affected tables:
update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');Thanks
I do use phpMyAdmin, so the method you suggest might be the best idea if there is nothing else available.
I will need to limit the query to a specific book, but that looks like it might just be a case of getting the node ids from the book table for a particular book id.
Perhaps I should make a backup before I start :)