Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently Page Title can only append page number to the end of a title. When you have title like "Bla-bla. | www.example.com" you end up with ugliness like "Bla-bla. | www.example.com | Page 2". It would be much better to have more control how we insert page number. Expected result: "Bla-bla. Page 2 | www.example.com".
Unfortunatly, I don't have good ideas how to implement that, so setting it as task.
Comments
Comment #1
nicholasThompsonGood Feature Request.
I guess we have 2 options...
Any thoughts?
Comment #2
crea CreditAttribution: crea commentedI would skip half-baked workaround (1) and go for 2. I think number of replaces won't matter, because tokens are cached in memory and replacement is fast enough operation. Please correct me if I'm wrong, and it needs a benchmark.
Comment #3
nicholasThompsonOk - so Option 2... Page Numbers get their own pattern.
How about we extend this to a per-scope basis? Is there any justifiable use-case for needing the Page Number Pattern to be
| Page [page-number]
for, say, article listing pages but.. er...| User Listing Page [page-number]
for others?I'm thinking that as the position of the page number token may vary in the title, maybe we need a per-scope option?
Comment #4
crea CreditAttribution: crea commentedI suggest not to implement page number as pattern, but to use page number token, and only add 1 additional page title pattern for every scope. I think it will be more simple to user (he doesn't need to understand the concept of additional "page number pattern" in this case). That additional page title patter will work in the case of page number > 1, so user will have 2 page title patterns for every scope: with, and without page number.
Yes, it may look worse, because settings form will be big, but at the same time it will be much easier to understand.
Comment #5
brianmercer CreditAttribution: brianmercer commentedSubscribed. Thanks to anyone who submits a patch for this.
Comment #6
retolist CreditAttribution: retolist commentedSubscribe
Comment #7
DamienMcKennaThe D6 branch is no longer supported so no new features will be added.