Search code examples
pythonplonearchetypes

How can I access the value of 'imageCaption' field of a ATNewsItem object?


How can I access the value of imageCaption field of a ATNewsItem object?

I tried news_item_obj.getField('imageCaption') but the result is always None.


Solution

  • You are only getting the field itself, not the value. Just use the accessor:

    news_item_obj.getImageCaption()