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
Added method getByPath to post model #363
base: 3.0
Are you sure you want to change the base?
Conversation
@jgrossi I give up... the StyleCI is pointing things outside my auto PSR formatter. Can you accept this PR and make any adjustment to code styling, etc you judge needed. Thank you. |
Hey @HenriqueSPin thanks for the PR. Can you update the PR description to tell us more about what it's doing? I've seen you created 3 or 4 PRs in the last 24 hours. In this case, it'd be nice to have a Thanks for contributing! 🎉 |
OK fine. Are you trying to get the page with |
@jgrossi Yeap. Exactly this. No matter how many steps in the hierarchy (step1/step2/step3/stepN). The logic was directly copied from WP core. Isn't a WIP. It's tested and working. Sorry for the amount of PRs... I didn't know I just had to push to my fork and the PR follows... I was trying to acomodate the code to Code Climate and StyleCI. Thank you. |
@jgrossi Any feedback? |
Any update about this? |
Hey! Any update here? Or does Corcel already support this? I can't see it in the docs though. |
@HenriqueSPin I don't know why I didn't merge this before 😢 sorry! I changed to branch 3.0, can you update the PR before merging please? |
Added the getByPath method to Post model extracted the logic from WP source. Allowing retrieve pages with nested paths (parent pages).
Example: A child page with the following permalink:
parent/child
.This is useful in use cases where you need a "wildcard" path for the pages created in the backoffice.
So your last route may look like: