where tag <p> appeared from ?

Author Message

Leeloo Dalas

Wednesday 18 May 2005 9:27:44 am

Hello All!
I am beginner at Ez Publish. I did read a lot of documentation, but i can understand one thing :((

In admin part i did create some content objects of the standart (classic) "Article" class.

In the template i did fetch information.
BUT!

On the page (front office) every fetched content appear with tag <p>

<p>My intro, la la la</p>

In template it looks like:

{attribute_view_gui attribute=$node.object.data_map.intro}

 

It totally destroy my design ;(

I noticed that problem appears only when attribute type of the fetched item is "XML Text field" (In my case: "body" and "intro"). But i need use this type in order to use extension xmlarea than.

Why this tag appears? How can i avoid this?
PLEASE HELP ME!

Mark Marsiglio

Wednesday 18 May 2005 10:05:29 am

Turn on the template debugging feature and it will help you see what the cascade of templates that renders the page does.

The datatype view template is my guess, but the template debug will tell all. You will need to clear the cache after enabled the debug, and beware that it will make the rest of the design look pretty bad. However, this tool is invaluable for determined where things like the <p> tags come from.

Once you find the offending template, override it by creating a new template with the same name, in the same relative location, but in your design folder (not the standard or base folders). Strip out the <p> tags and see if it worked. When it does, the template debug will reference your new template location.

Add this line to your site.ini.append.php for your user siteaccess:

[TemplateSettings]
Debug=enabled

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Leeloo Dalas

Thursday 19 May 2005 5:29:07 am

Thanks for answer!
I turn on template debug and find out that every time when i try to fetch attribute that has type "XML Text field" some others template were included (ezxmltext.tpl and paragraph.tpl from standart directory).

So, tag <p> appeared from
design/standard/templates/content/datatype/view/ezxmltags/paragraph.tpl.

I did override it (design/corporate/override/templates/paragraph.tpl), strip out tag <p>, and cleared cash.
It works!
There is no <p> tag and design is normal.

BUT! I found out another problem. There is no <p> tag AT ALL. And it is problem in large text body (For examle in article body, where some pieces of text should be separated).

How can i manage including paragraph.tpl?

 

Leeloo Dalas

Tuesday 24 May 2005 10:10:02 am

Seems like it is impossible to forbid show ezxmltext datatype NOT enclosed into <p>content</p> anyway. The content of an ezxmltext datatype is embeded into a <paragraph> by default.

It it impossible to solve it by template overrading.
And i suppose that problem solving is in kernel .

Am i right?
Please help me! I am realy STUCK!

Dmitry Lakhtyuk

Monday 06 June 2005 5:21:24 am

To use several templates to display 'paragraph' tag inside single xml-attribute you should specify 'class' for 'paragraph' tag:

<paragraph>default paragraph.tpl</paragraph>
<paragraph class='my_paragraph_style'>your_paragraph.tpl</paragraph>

In your <i>override.ini.append.php</i> you should add:

[xml_paragraph_view]
Source=content/datatype/view/ezxmltags/paragraph.tpl
MatchFile=xml/my_paragraph.tpl
Subdir=templates
Match[classification]=my_paragraph_style

Leeloo Dalas

Thursday 09 June 2005 2:00:18 am

I don't need to use several templates to display paragraph.
I just want to avoid embeding content into this tag in the beginning and in the end of content item.
Paragraph inside content item is ok!

Problem is that content of an ezxmltext datatype is embeded into a <paragraph> by default. And it happens autonomically and I can't specify 'class' then.

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 16:24:36
Script start
Timing: Jan 18 2025 16:24:36
Module start 'layout'
Timing: Jan 18 2025 16:24:36
Module start 'content'
Timing: Jan 18 2025 16:24:37
Module end 'content'
Timing: Jan 18 2025 16:24:37
Script end

Main resources:

Total runtime0.7980 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 589.0313152.6250
Module start 'layout' 0.00490.0030 741.656339.4453
Module start 'content' 0.00790.7888 781.1016626.5547
Module end 'content' 0.79670.0013 1,407.656316.1641
Script end 0.7980  1,423.8203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3913160.0002
Check MTime0.00140.1730160.0001
Mysql Total
Database connection0.00080.103410.0008
Mysqli_queries0.731091.6024680.0108
Looping result0.00060.0706660.0000
Template Total0.771696.720.3858
Template load0.00170.215620.0009
Template processing0.769896.469320.3849
Template load and register function0.00010.017710.0001
states
state_id_array0.00080.103610.0008
state_identifier_array0.00060.080220.0003
Override
Cache load0.00150.1941570.0000
Sytem overhead
Fetch class attribute can translate value0.00090.113930.0003
Fetch class attribute name0.00100.119780.0001
XML
Image XML parsing0.00250.319030.0008
class_abstraction
Instantiating content class attribute0.00000.0027110.0000
General
dbfile0.00220.2806210.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 39
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs