eZ Community » Forums » Developer » add_breaks_to_object_attribute
expandshrink

add_breaks_to_object_attribute

add_breaks_to_object_attribute

Thursday 22 January 2015 11:51:56 am - 3 replies

Hi

I have added an XML Block called desc and I am accessing the attribute like

$desc = strip_tags(html_entity_decode($description,ENT_QUOTES | ENT_HTML5));

when I am adding breaks in the XML Block it is not displaying.Is there a way to add br tags for a xml block.??

please can you help?

Thursday 22 January 2015 6:40:14 pm

Hello upeksha,

Remember that ezxml the storage format for xml blocks is XML not HTML and so no br tags are not (and will never be) supported.

You can create custom tags to support them if you wish but it's a very bad practice that is strongly discouraged.

To my limited knowledge on the subject ezoe uses paragraph tags to separate different sections (lines) of content within ezxmltext attribute content.

I hope this helps!

Cheers,
Heath

Friday 23 January 2015 10:08:38 am

Thank you that worked really well. happy.gif Emoticon

Saturday 24 January 2015 12:58:28 am

Hello upeksha,

I'm pleased I could help you find a solution to your issue.

Best wishes.

Cheers,
Heath

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from