Advanced token replacement based on path for page titles
JacobSingh - July 31, 2008 - 07:27
| Project: | Page Title |
| Version: | 6.x-2.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | nicholasThompson |
| Status: | needs review |
Description
This patch allows the user to let certain pages use different title patterns based on their paths.
Keep in mind, this is the actual browser path (i.e. $_SERVER['REQUEST_URL'] not $_GET['q']).
| Attachment | Size |
|---|---|
| advanced_page_title.patch | 2.25 KB |

#1
I like this idea a lot - would allow for control of non-node pages quite nicely.
I'm not sure about the implementation though - it's fine for able-minded people such as you and I, however I'm not sure your Standard Issue blogger would be able to configure that sensibly...
#2
This would make a nice addition to the 2.x branch (the 1.x branch is frozen now).
#3
This is still a feature I'd like to implement... I'm thinking some kind of "URL Pattern : Token Pattern" system where People can add things like "forum/%" and map it to a token pattern. This would solve, or at least be a simple work-around, for implementing integration with Views.
I am, however, going to mark it as Postponed simply so we can get Page Title 2 out for final release and port it to Drupal 6.
#4
I get bored easily... This is something I'd do in Drupal 6 first...
What does this do? It adds a new configuration tab... That tab allows you to add, delete and edit new path pattern "things". These are path:pattern:scope sets. The scope defines what object gets passed to tokens.
I've just tested this out against the current DRUPAL-6--2 release and I can actually control the page title template of taxonomy/term/* pages and user/* pages. I think this is a small victory!
The problem now is how to make it "aware" of the context... Its all very good saying "this is a user page", but the URL might not necessary be "user/*" and its not safe to assume the UID is always in arg(1)....
I feel the answer may in fact lie with menu_get_item() and menu_get_object()....
Any thoughts?
#5
subscribe