This is my second patch ever.. be warned =)
This patch adds several new fields to the settings page for page_title:
- separate pattern fields for auto-generated titles vs. manually entered titles
- ability to add a global prefix and/or suffix to the page title
- added placeholders %breadcrumb and %reverse_breadcrumb
- added breadcrumb delimiter field
These features should enhance your control over the title tag -- for SEO purposes (or otherwise).
For example, here are the values I am using for our site www.3ring.com:
Pattern for pages with auto-generated title: %page_title » %reverse_breadcrumb
Pattern for pages with manually entered title: %page_title
Pattern for front page: 3RING.com | Online Marketing | Vancouver, Toronto, Halifax
Title prefix: n/a
Title suffix: | 3RING.com | Online Marketing | Vancouver, Toronto, Halifax
Breadcrumb delimiter: »
I'd appreciate any feedback you have!
c.h.u.d.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | page_title.module_1.patch | 5.66 KB | chud |
| page_title.module_0.patch | 5.55 KB | chud |
Comments
Comment #1
chud commentedUpdate: found a couple bugs with my first patch... new one attached.
Comment #2
toma commentedHello
i think its good add to this module, i like to have title change over the taxonomy and vocabulary ..by the way can you provide all the module code with your feature, because i have a lot of errors when i do patch, thanks for your work
Comment #3
robertdouglass commented@chud, thanks for this patch. It contained a bug-fix for a problem with listings pages (the if ($page) test in nodeapi). I've applied that bugfix now to 4-6 and 4-7. As for the prefix and postfix fields, I see these as unneccessary; why use those fields instead of just putting a prefix and postfix in the template field itself? I'm also not sold on the breadcrumb functionality; this looks more like a very small niche feature than something a lot of people will want to use. You can argue otherwise and I can reconsider. Finally, I really don't see the logic in having different templates for auto and manually made page titles. Why?
@toma, I'd really like to do listing pages, and through using brute strength and invasive hacks, I could do it. But I choose not to because I don't like features that rely on brute strength and invasive hacks. The sad truth is that the taxonomy module is not written in a way that invites easy extension of this sort. Here is a patch that would make it easier to add this feature:
http://drupal.org/node/64664
Comment #4
robertdouglass commented