Once you successfully add a custom field, is there an (efficient) way to retrieve items based on that custom field ?
For example, let’s say I add the custom field
fun_level to topics. So now there’s the field
topic.fun_level (a string) added through my plugin.
Now, I want to retrieve and show a topic list of all topics where fun_level = “super-duper-fun”.
How would I do that?
If we want to retrieve all topics with, say, a certain tag, we can use
ajax('/tags/tag-name.json').then(function(result))... , like used in this explanatory post.
For a custom field we’ve just created, this wouldn’t be available (I think). As this would require creating a controller for the custom field (like a controller for
fun_level , with a show method that somehow retrieves all the topics where fun_level equals that
:fun_level param value, or something like this).
I assume there is a more straightforward way?