Over on the Logos Bible Software Blog Phil did a write up on Adding RefTagger to a Drupal Site. I really like RefTagger for the way it turns any bible reference into a link with a snazzy little tool tip. (Like John 3:16) But unfortunately Phil’s tutorial leaves a bit to be desired.
He advocates hacking the page.tpl.php template file for your theme. But doing so is not recommended for the following reasons.
- You risk messing something up and ruining your theme. This may not be a big one for some folks who consider themselves savvy but if you’re uncomfortable at all – hacking source files is a bad way to make changes.
- You will definitely lose your work if you install an upgrade since it will just overwrite your changes.
- If you change themes you’re work is also lost and you have to keep hacking new template files.
With all due apologies to Phil what’s the recommended/best method?
Use Drupal’s powerful Blocks which are designed for insertion of various code excerpts.
- Log in as the administrator.
- Navigate to admin>Site building>blocks
- Click on ADD block or simply type this in your address bar: http://www.yoursitename.com/admin/build/block/add
- Paste the reftagger code into a block and name it something ingenious like “RefTagger”.
- Change the “input format” to full HTML and save the block.
- Then activate it as a footer block, it will remain invisible but will immediately tag every reference on your site!
Don’t mess with the template’s unless you absolutely have too, keep it simple and use Drupal the easy and correct way. 🙂