Forums / Setup & design / attribute_view_gui to display a XML block entry - SOLVED
Sejal Paliwal
Thursday 13 November 2008 2:22:07 am
I have used "attribute_view_gui" to display a XML block entry, but template in ez is automatically inserting a <p> tag , which I dont want. I have used the following code in my template file.
{attribute_view_gui attribute=$node.object.data_map.authors}
Output that I am getting is-
Author(s) : Munwar Shariff
Expected Output -
Kindly help.Thanks in Advance.
Łukasz Serwatka
Friday 14 November 2008 12:19:56 am
Hi,
attribute_view_gui using template for output rendering. You can override view template for this datatype in your design and remove unnecessary tag. Standard template is located in: design\standard\templates\content\datatype\view\ezauthor.tpl
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog
Friday 14 November 2008 3:09:35 am
Thanks for this.
As you said, I created new override for /content/datatype/view/ezxmltags/paragraph.tpl and deleted the <p> tag(this gave me the expected output), but now all the xml blocks are affected and all my paragraghs have been removed and formed a single block.
Is there any way, I can have two types of XML block, one with and the other without <p> tag?
Please guide me to create new datatype?
Friday 14 November 2008 3:22:05 am
You can have override per class attribute. So only this attribute will use your custom template override.
http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_override_conditions
Monday 17 November 2008 9:37:55 pm
Thanks for the guidance!!! It worked!!