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

Comments

Projects
None yet
2 participants
@piotrpog
Copy link

commented May 20, 2019

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

This comment has been minimized.

Copy link
Member

commented May 20, 2019

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

This comment has been minimized.

Copy link
Author

commented May 21, 2019

@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
You can’t perform that action at this time.