Page numbers in <title> for paginated list view of blog #224

Closed
mkoistinen opened this Issue Mar 27, 2013 · 2 comments

Comments

2 participants
@mkoistinen

Greetings. I want (need) to be able to change the page title for the main blog list view (at /blog/) so that when we're on a page > 1, the title will indicate the page just like it does for the list views on /blog/categories/ or /blog/authors/, etc.) I thought I was going crazy that I was unable to use {{ page_obj }} in entries_list.html for the list view of the whole blog. However, I checked a number of the example sites listed in the README.rst and in every case, going to page > 1 (where pagination is available), the title of the resulting page is indistinguishable from the title at /blog/.

So, I thought this would be easy and I would dive in and try to fix this and generate a pull request, but I'm afraid that Zinnia is written in a very sophisticated way that, in the end, I have no idea where to inject page_obj or something that contains the current page number into the context in a way that supports the existing architecture.

At this point, I'd be tempted to use a context processor or middleware for this to avoid messing with this otherwise beautifully DRY code, but I think that'd be like using a sledge hammer on a thumb tack.

Can someone have a look at this? Or, point me in the right direction?

@mkoistinen

This comment has been minimized.

Show comment Hide comment
@mkoistinen

mkoistinen Mar 28, 2013

Nevermind, I've fixed this with a few additions to the entry_archive.html template! See pull request: "Fix missing page numbers in <title> tags for archive pages (where page number > 1)"

Nevermind, I've fixed this with a few additions to the entry_archive.html template! See pull request: "Fix missing page numbers in <title> tags for archive pages (where page number > 1)"

@mkoistinen mkoistinen closed this Mar 28, 2013

@Fantomas42

This comment has been minimized.

Show comment Hide comment
@Fantomas42

Fantomas42 Mar 29, 2013

Owner

This behavior in the templates seems to be a regression.

I will look on your fix soon.

Owner

Fantomas42 commented Mar 29, 2013

This behavior in the templates seems to be a regression.

I will look on your fix soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment