Skip to content
This repository was archived by the owner on Jun 13, 2019. It is now read-only.

Another dumb question - content fields for an element #5

Open
1stevengrant opened this issue Dec 16, 2015 · 4 comments
Open

Another dumb question - content fields for an element #5

1stevengrant opened this issue Dec 16, 2015 · 4 comments

Comments

@1stevengrant
Copy link

How do I display them?

Do I need to create a new EntryTransformer?

@wesrice
Copy link
Collaborator

wesrice commented Dec 17, 2015

You can can either append ?include=content to the endpoint, or make your own transformer.

@1stevengrant
Copy link
Author

cool. I'll go the transformer route I reckon. I error out when I add the content param as it stands.

@wesrice
Copy link
Collaborator

wesrice commented Dec 18, 2015

Hey @stevieg83, I'm curious as to how ?include=content isn't working.

How many elements exist in the element type you are querying? By default, Craft's ElementCriteriaModel queries for 100 elements, so try adding ?limit=10 if there are a lot of elements.

Also, do the elements you're trying to retrieve have a lot of fields that contain relationships?

@1stevengrant
Copy link
Author

99 elements - limiting to 10 works.

I get this problem Call to a member function getRawContent() on null

It's a pretty simple Craft site, effectively a job board that has a job title, description and application info that are just standard Redactor fields.

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

No branches or pull requests

2 participants