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

Setting alternative base URL of pagination #4286

Closed
piotrpog opened this issue May 20, 2019 · 2 comments
Closed

Setting alternative base URL of pagination #4286

piotrpog opened this issue May 20, 2019 · 2 comments

Comments

@piotrpog
Copy link

I propose some method of setting alternative base URL of pagination links. Right now URL of pagination links is taken from page that pagination is used in.

I would like to display paginated links on homepage of my site, but links should direct to specific section that is NOT homepage.

@brandonkelly
Copy link
Member

Just made this possible for the next release.

For example, to set the base pagination URL to the homepage, you could do this:

{% paginate query as pageInfo, pageEntries %}
{% do pageInfo.setBasePath('') %}

@piotrpog
Copy link
Author

@brandonkelly
Thanks, it will be really useful for me.

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

No branches or pull requests

2 participants