eZ Community » Forums » eZ Publish 5 Platform » Importing articles, how to manage...
expandshrink

Importing articles, how to manage XMLText field?

Importing articles, how to manage XMLText field?

Wednesday 23 September 2015 9:13:23 am - 1 reply

When using ezDemobundle class Content->Article, how do I import HTML (via Command) into the 'body' field that is of type XMLText?

I do not want to use legacy (if possible).

Thursday 01 October 2015 3:55:11 pm

Hi,

i'm using something like This:

 

 $contentService = $this->getRepository()->getContentService();
 
 $contentType = $contentTypeService->loadContentTypeByIdentifier( 'article' );
 
$contentCreateStruct = $contentService->newContentCreateStruct( $contentType, 'ger-DE' );
 
$contentCreateStruct->setField(  $filedType, '<?xml version="1.0"  encoding="utf-8"?><section>  <paragraph>'.YOUR-HTML-TEXT.'</paragraph></section>'  );
expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from