attribute_view_gui to display a XML block entry - SOLVED

Author Message

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 -

Author(s) : Munwar Shariff 

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

Sejal Paliwal

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?

Łukasz Serwatka

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

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Sejal Paliwal

Monday 17 November 2008 9:37:55 pm

Thanks for the guidance!!! It worked!!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:40:05
Script start
Timing: Jan 18 2025 19:40:05
Module start 'layout'
Timing: Jan 18 2025 19:40:05
Module start 'content'
Timing: Jan 18 2025 19:40:06
Module end 'content'
Timing: Jan 18 2025 19:40:06
Script end

Main resources:

Total runtime0.9098 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 588.1563152.6563
Module start 'layout' 0.00590.0035 740.812539.5078
Module start 'content' 0.00940.8979 780.3203561.2969
Module end 'content' 0.90730.0025 1,341.617212.0938
Script end 0.9098  1,353.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.4036160.0002
Check MTime0.00140.1486160.0001
Mysql Total
Database connection0.00080.082410.0008
Mysqli_queries0.847793.1757630.0135
Looping result0.00080.0869610.0000
Template Total0.873596.020.4368
Template load0.00210.233120.0011
Template processing0.871295.753020.4356
Template load and register function0.00020.027010.0002
states
state_id_array0.00130.142810.0013
state_identifier_array0.00230.247820.0011
Override
Cache load0.00180.1941270.0001
Sytem overhead
Fetch class attribute can translate value0.00080.088520.0004
Fetch class attribute name0.00140.152560.0002
XML
Image XML parsing0.00090.094720.0004
class_abstraction
Instantiating content class attribute0.00000.002470.0000
General
dbfile0.00100.1090180.0001
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs