Skip to content

Document pagination URL patterns#470

Open
samdark wants to merge 1 commit into
masterfrom
docs-pagination-url-patterns
Open

Document pagination URL patterns#470
samdark wants to merge 1 commit into
masterfrom
docs-pagination-url-patterns

Conversation

@samdark
Copy link
Copy Markdown
Member

@samdark samdark commented May 30, 2026

Summary

  • add routing guide examples for query-string pagination and path-segment pagination
  • show preserving current filters while replacing only the page query parameter
  • note that duplicate URL shapes for the same list need a canonical choice

Verification

  • Used a fresh yiisoft/app template created with composer create-project yiisoft/app /tmp/yii-docs-upload-app --no-interaction
  • Added verify-pagination-url-patterns.php to exercise Yii Router route generation
  • Ran php -l verify-pagination-url-patterns.php
  • Ran php verify-pagination-url-patterns.php; verified generated URLs:
    • /articles?page=2&tag=yii
    • /articles/page/2?tag=yii
    • /articles?tag=yii&sort=created_at&page=3
  • Ran vendor/bin/phpstan analyse verify-pagination-url-patterns.php --level=max --no-progress
  • Ran vendor/bin/psalm --no-cache --output-format=console verify-pagination-url-patterns.php
  • Ran npx markdown-link-check src/guide/runtime/routing.md
  • Ran npm run build

Copilot AI review requested due to automatic review settings May 30, 2026 10:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds guidance to the routing guide for generating pagination URLs in Yii applications, covering both query-string and path-segment patterns.

Changes:

  • Adds examples for query-string pagination URLs with filters.
  • Shows how to preserve existing query parameters while replacing page.
  • Documents path-based pagination URLs and canonical URL considerations.

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

Successfully merging this pull request may close these issues.

2 participants