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

nicholasThompson’s picture

Category: task » feature

Good Feature Request.

I guess we have 2 options...

  1. Have a Page Number prefix (as well as suffix). This will allow us to have the Page number at the beginning of the title rather than the end...
  2. Have the Page Number suffix (and prefix if we implement that) turned into their own tokens which can be placed into the patterns above. This gives the most flexibility but would probably require two passes of the token_replace function as the page number itself is a token.

Any thoughts?

crea’s picture

I 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.

nicholasThompson’s picture

Ok - 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?

crea’s picture

I 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.

brianmercer’s picture

Subscribed. Thanks to anyone who submits a patch for this.

retolist’s picture

Subscribe

DamienMcKenna’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

The D6 branch is no longer supported so no new features will be added.