Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement pagination with rel=“next” and rel=“prev” #1325

Open
hvelarde opened this issue Jan 21, 2016 · 2 comments
Open

Implement pagination with rel=“next” and rel=“prev” #1325

hvelarde opened this issue Jan 21, 2016 · 2 comments

Comments

@hvelarde
Copy link
Member

Sequence of pages where each one can have a previous sibling and a next sibling should implement HTML elements <link rel="prev" href="..." /> and <link rel="next" href="..." /> to indicate the relationship among them.

Search engines use this information to consolidate indexing properties and send users to the most relevant page (typically the first page of the series).

We propose to implement this in both Plone 4.3 and Plone 5.0.

More information:

@rodfersou
Copy link
Member

At my first attempt with this issue, I try to add a new viewlet at plone.batching package to try to use the batch object to get when should I add the next and prev links in the head. After reading some code I saw that I could not share the batch object between the navigation view (or macro) and the viewlet.

Than I try to fill the head_slot in the navigation macro, and it broke the folder_contents view because it could not insert the main_template macro in the folder_contents view.

The last attempt was to set a request parameter in the view and try to get it into the viewlet.. and it didn't work too. the viewlet is evaluated first and the request still didn't have the variables set.

My other idea was to use a transform, like we do into collective.lazysizes, but didn't try it yet.

@hvelarde
Copy link
Member Author

hvelarde commented Feb 5, 2016

if someone at the @plone/framework-team has an idea on how to implement this, please let us know.

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

No branches or pull requests

2 participants