We are trying to display the meta description field of a document on our search results page. It looks like it is quite hidden in the system, but probably easy if one knows how to get actual extension data.
A search hit has this fields:
Massive\Bundle\SearchBundle\Search\QueryHit
#document: Sulu\Bundle\SearchBundle\Search\Document
#score: 0.38863644103659
#id: "af9683db-f9f8-4cee-a784-c384019150e8"
}
I can use the sulu_document_manager.document_manager
service to get the corresponding PageDocument for the Id, which in turn seems to have access to the extension data:
/** @var PageDocument $document */
$document = $this->documentManager->find($id);
But how to actually get access to the concrete value descripion
of the seo extension? Is this even the right way to do it, or should I use a different approach?
Thx a lot!
Andreas