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

Consistent page path/id methods #4489

Open
distantnative opened this issue Jul 11, 2022 · 1 comment
Open

Consistent page path/id methods #4489

distantnative opened this issue Jul 11, 2022 · 1 comment
Labels
needs: delay ⏳️ Requires more time, on hold type: enhancement ✨ Suggests an enhancement; improves Kirby type: refactoring ♻️ Is about bad code; cleans up code

Comments

@distantnative
Copy link
Member

distantnative commented Jul 11, 2022

Method Description Example Alternative?
$page→dirname() full directory name with num and uid 2_project-b $page→dirname()
$page→diruri() full path with sorting num und uid 1_projects/2_project-b $page→dirpath()
$page→id() path with uid projects/project-b $page→path(false)
$page→uri() path with translated slugs projekte/projekt-b $page→path($lang)
$page→uid() slug but always untranslated project-b $page→slug(false)
$page→slug() folder name or translated slug projekt-b $page→slug($lang)
$page→uuid() UUID with schema page://12345678-90ab-cdef-1234-567890abcdef  

We should try to pave the path in Kirby 3.8, meaning

  • all alternative methods should be working as intended in the future
  • where needed methods (or parameter usage) should be marked as deprecated in the comments/docblocks
  • go through code base and alter references to be consistent with new naming
  • docs need to be updated everywhere to only show new methods
  • real deprecation warnings should only be thrown after docs have been updated for a significant amount of time (6-12 months)
  • removing deprecated methods should follow one major version after deprecation notice
@distantnative distantnative added type: enhancement ✨ Suggests an enhancement; improves Kirby type: refactoring ♻️ Is about bad code; cleans up code labels Jul 11, 2022
@distantnative distantnative added this to the 3.8.0 milestone Jul 11, 2022
@distantnative distantnative self-assigned this Jul 12, 2022
@lukasbestle lukasbestle linked a pull request Sep 15, 2022 that will close this issue
@distantnative distantnative removed this from the 3.8.0 milestone Sep 16, 2022
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. This is for us to prioritize issues that are still relevant to our community. It will be closed if no further activity occurs within the next 14 days. If this issue is still relevant to you, please leave a comment.

@github-actions github-actions bot added the type: stale 💤 Will be closed soon because there was no recent activity label Mar 16, 2023
@lukasbestle lukasbestle removed the type: stale 💤 Will be closed soon because there was no recent activity label Mar 19, 2023
@distantnative distantnative added the needs: delay ⏳️ Requires more time, on hold label Aug 11, 2024
@distantnative distantnative removed their assignment Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: delay ⏳️ Requires more time, on hold type: enhancement ✨ Suggests an enhancement; improves Kirby type: refactoring ♻️ Is about bad code; cleans up code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants