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

Fetching posts via a custom key #46

Open
joshhornby opened this issue Feb 8, 2019 · 1 comment
Open

Fetching posts via a custom key #46

joshhornby opened this issue Feb 8, 2019 · 1 comment

Comments

@joshhornby
Copy link

Hi,

I assume the answer is no, but is it possible to fetch a post in a collection via something other than the slug?

For example each post in my collection has a field “foo_id” which is a custom field type. The custom field type is pulling data from an external system so we can link posts together. I want to then fetch the posts that match a given “foo_id”.

If it’s not possible would you be open to a PR to allow this functionality?

Thanks

@aryehraber
Copy link
Owner

Hey @joshhornby, sorry for the late reply. You are correct, this isn't currently possible.

Custom filtering has been on the roadmap for a little while now, but in anticipation for Statamic v3, I've stopped dev as there is a high chance that the addon will need to be rebuilt anyway.

If you require the feature anyway, feel free to submit a PR -- if the code is easy to follow and I can test that there are no breaking changes then I may be able to merge your work. Worst case, you'll have to use your own forked version which is probably fine too!

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

No branches or pull requests

2 participants