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

Paginated links should be relative not absolute #1719

Closed
aryehraber opened this Issue Jan 15, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@aryehraber

aryehraber commented Jan 15, 2018

Expected behaviour

Within the paginate tag pair, the prev_page & next_page should be relative URLs.

For example: /blog?page=2

Similar to the url tag when looping over Collection entries.

Actual behaviour

Currently, prev_page & next_page output absolute URLs.

For example: https://domain.com/blog?page=2

Note

I understand that most of the time this shouldn't be an issue, but I'm facing a problem now where multiple subdomains are pointing to a single Statamic build, and static caching is messing up the next/prev URLs because they are absolute. All other links on the site are relative, so everything is working as expected, except the blog next/prev links.

Perhaps this can be added as an option? {{ paginate absolute_urls="false" }} (though for the sake of consistency with other URLs outputting, relative should be the default)

Server Details

Statamic Version:
v2.7.3

@jackmcdade

This comment has been minimized.

Member

jackmcdade commented Mar 29, 2018

nice catch.

@jasonvarga jasonvarga closed this Mar 29, 2018

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