3

we are trying to get the fields(images and other kind of fields) of a component using oData web service. We have a component (/odata.svc/Components(ItemId=int,PublicationId=int)) and we need to read all fields in general tab of the component.

Thank you

3

Tridion content (what you're stating is in the General tab) is published as a "Component Presentation", not as a field collection and also not as a Component - what you see as a component in OData is just the metadata/pointer to that object. The same component could have many component presentations depending on the templates used to publish it from the CM.

What people tend to do here is publish the content using a structured data format, like JSON or XML, and then parse it on the web application. If your template outputs HTML (which is not uncommon) then using OData to read the component presentation will give you that same HTML.

Explore using ComponentPresentations in OData instead of Components, you may have to change your Component Template to allow dynamic publishing instead of Embedded only.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.