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']).

AttachmentSize
advanced_page_title.patch2.25 KB

#1

nicholasThompson - July 31, 2008 - 09:29

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

nicholasThompson - July 31, 2008 - 09:32
Version:5.x-1.1» 5.x-2.x-dev
Component:Code» User interface
Assigned to:Anonymous» nicholasThompson

This would make a nice addition to the 2.x branch (the 1.x branch is frozen now).

#3

nicholasThompson - September 25, 2008 - 15:28
Status:active» postponed

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

nicholasThompson - September 25, 2008 - 22:41
Version:5.x-2.x-dev» 6.x-2.x-dev
Status:postponed» needs review

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?

AttachmentSize
page_title_6_path_patterns.patch 8.31 KB

#5

Murz - September 28, 2008 - 08:15

subscribe

#6

Poieo - December 3, 2009 - 04:07

This would solve the problem with Views and Panels. Why did it die here? Is there another method for altering the page titles of Panels and Views?

 
 

Drupal is a registered trademark of Dries Buytaert.