This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Forums » eZ Publish 5 Platform » Render paragraph class in...

Render paragraph class in ez_render_field template

Render paragraph class in ez_render_field template

Monday 23 September 2013 12:45:11 pm - 6 replies

Can someone help me to render a paragraph class from an XML block in a twig template?
So if in the XML block I have:

 <paragraph class="main_intro"></paragraph>

then the output from the ez_render_field twig template should be:

 <p class="main intro"></p>

Presently I can only get it to output:


My content.ini.append.php:

My XML block content as data_text:

My template that calls my ez_render_field override template:

My ez_render_field override template:

Many thanks

Modified on Monday 23 September 2013 12:45:53 pm by Mark Blackmore

Monday 23 September 2013 1:24:30 pm

Hello Mark

This is not supported out of the box, but you can easily override the XSL stylesheet to add your custom behavior (like we used to do when overriding ezxml tags in legacy).

Please refer to custom tags documentation to know how to proceed (requires 2013.07 / 5.2).

Monday 23 September 2013 3:25:47 pm

Thanks Jérôme. Luckily I am on 2013.07 so it is a nice solution.

Tuesday 24 September 2013 9:17:18 am

isn't it a missing feature, should it only be for BC ? Legacy eZOE used in admin interface can indeed be configured to allow css classes on paragraphs and other tags, custom or not. If they're not rendered properly in the front, it means that we always have to update manually the XSL stylesheets each time we want to upgrade a website to the symfony stack...

My colleague opened a pull request about this several months ago ( and though it has been polluted with formatting issues, I feel like it has not been fully discussed. Maybe now's the time blunk.gif Emoticon

Tuesday 24 September 2013 10:33:44 am

Hi Benjamin

You're probably right. However the PR is almost unreadable because of EOL issues. Could you (or your colleague) open a new one ? I'll have a closer look happy.gif Emoticon.


Wednesday 25 September 2013 10:01:36 am

Thanks Jérôme, Mathieu is remaking his PR right now.

By the way, could you take another look at PR #488 (, also about XmlText rendering BC breaks. It is currently stuck due to markup philosophy questioning which IMHO could be resolved by a later update...

Wednesday 25 September 2013 11:56:28 am

Amended and merged !

Thanks Benjamin happy.gif Emoticon


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

36 542 Users on board!

Forums menu

Proudly Developed with from