Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Conversation

@thoemmi
Copy link
Contributor

@thoemmi thoemmi commented Jul 1, 2015

When paginating, currently each page gets a PageContext instance differing only in the Paginator and OutputPath properties. Especially all PageContexts share the same Bag dictionary.

However, if you want to use page.url in your template, you always get the url of the first page, even on the successive pages. This makes it impossible to include a canonical url in the head of your HTML page.

This PR changes the copy c'tor of PageContext so that it receives a clone of the original PageContext.Bag, and when paginating each PageContext's bag will have its correct url property set.

@laedit
Copy link
Contributor

laedit commented Aug 4, 2015

Sorry for the silence, I was out of town for a few time.
Thanks a lot for your PR! 😃

laedit pushed a commit that referenced this pull request Aug 4, 2015
@laedit laedit merged commit 1e74fe2 into Code52:master Aug 4, 2015
@thoemmi thoemmi deleted the canonical-urls-when-paginating branch August 4, 2015 05:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants