Closed wjthomas9 closed 10 years ago
Just tried it with also specifying a channel. Is it required to specify a channel in addition to entry_ids?
You're right about everything here: 1) you need to specify the channel
parameter to get custom fields and 2) the entry_id
is the one attribute that is required and cannot be suppressed via the fields
parameter.
I'll add this to the documentation, thanks!
Ok. Ended up figuring that out by trial and error. Makes perfect sense now. Thanks for confirming!
-- Jon Thomas AnalyticL Inc. http://www.analyticl.com
On May 18, 2014 at 1:22:05 PM, Rob Sanchez (notifications@github.com) wrote:
You're right about everything here: 1) you need to specify channel a parameter to get custom fields and 2) the entry_id is the one attribute that is required and cannot be suppressed via the fields parameter.
I'll add this to the documentation, thanks!
— Reply to this email directly or view it on GitHub.
Example:
{exp:json:entries entry_id="64|63|62"}
only seems to output standard EE fields. Specifying custom fields doesn't seem to work. Also, entry_id is output no matter what.Expanded example:
{exp:json:entries entry_id="64|63|62" fields="title|announcement_body"}
outputs only the title and the entry_id as shown in the following output:
[{"title":"An announcement for Retail Customers in Illinois","entry_id":64},{"title":"An announcement for Retail and Institutional Customers","entry_id":63},{"title":"An announcement for all customers","entry_id":62}]
Is there a way to use the json plugin to grab entries by piped entry_ids and output all fields for the entry?