eZ Community » Forums » eZ Publish 5 Platform » PAPI Html5 Converter
expandshrink

PAPI Html5 Converter

PAPI Html5 Converter

Wednesday 29 July 2015 11:44:58 am - 2 replies

Hi eZ Forum,

i am Working with the REST-API. I want to return the articles body. I am using the html5 converter to convert the body to html. It seems that the converter is using sometimes -eg. for an embedded Gallery- certain templates. So at this moment i have some custom tags and now i am wondering, how i could take control of their rendering in the response.

 $this->setBody($this->html5Converter->convert($fields['body']['ger-DE']->attribute('xml')));

This will return in something like this for paragraphs

 <p class=\"pda-textparagraph\">blahblahblah.<\\/p>

So it uses some of our siteaccesses (pda).

But for certain elements the converter returns something like:

 <p><custom name=\"html\"><h1>hello world<\\/h1><\\/custom><\\/p>

So, i am wondering, how to control, which siteaccess or template the PAPI or converter is using for outputting some attributes.

 

Best regards,
Jacob 

Thursday 30 July 2015 1:13:55 am

Hi Jacob,
what was the source in those two cases? seems like the source was vastly different as well or? 

Thursday 30 July 2015 9:10:25 am

Hi André,

the source is an big article with lots of elements in its body. Meanwhile i figured out, how to set a siteccess via rest (X-Siteaccess), but it is not very clear, which template (design extension) is used to render the output.

I want to take affect on this rendering with own templates.

 

Edit:

This solves my question:

https://doc.ez.no/display/EZP52/H...t+a+Custom+Tag+for+XMLText+FieldType

Modified on Thursday 30 July 2015 12:44:50 pm by Jacob Ester

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from