Closed ascheider closed 1 year ago
I don't see Pimcore documents in Source data type selection.
This is because I wanted to simplify UI: Export type "Pimcore objects" can be used to export data objects, documents and assets (actually Pimcore elements would be correct here). Please select Document
as Source data class in this case.
To get the rendered HTML of the document you can use callback function
$document = \Pimcore\Model\Document::getById({{ DOCUMENT ID }});
$html = \Pimcore\Model\Document\Service::render($document);
return $html;
If you want to get HTML with absolute URLs (for images, CSS etc.), add
$html = \Pimcore\Helper\Mail::setAbsolutePaths($html, $document, \Blackbit\DataDirectorBundle\lib\Pim\Helper::getHostUrl());`
To make this even easier, I will add a data query selector convenience helper, so that you can simply add html
as raw data field data query selector for dataports with source data class Document
...
@BlackbitDevs Thanks for the reply, works fine 👍 Yes agree Pimcore Elements would be better name here.
Yes agree Pimcore Elements would be better name here.
Just renamed it in 3.5
Is there any possibility to export document content from pimcore via api? For example i have area bricks where i can input text or html code via wysiwyg, after that i want to embed the rendered document content in third party application via data director api. I don't see Pimcore documents in Source data type selection. Thanks!