new class

Author Message

Javier Loureiro

Tuesday 25 October 2005 12:21:03 pm

I need to create a new class that will be used for short news on the front page. I derived a class from article, and removed almost everything except body, and image, and I added an URL field.

Now I have 2 problems with the new class. On theadmin panel, when I list the short articles, there is no title, so, I see only the icon but nothing else on the content list. Is there any way to setup the body as title text or something?

And also, when I display the code, using a simple table:

<a class="newshort" target="_blank" href={$node.object.data_map.url.content|ezurl}>{$node.object.data_map.body.content|wash}</a>

I got the url, but the body part is empty... I dont know hot to start to check what is happening. On the admin menu, I can read the body content, and the id is body... any help, please?

Thanks!

Javier Loureiro

Kristof Coomans

Thursday 27 October 2005 12:59:46 am

What datatype has the body attribute?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Javier Loureiro

Thursday 27 October 2005 11:09:51 am

Hello! Thanks for your question, because looking the answer, I found the solution :)

it's a ezxmltext

$node.object.data_map.body.content.output.output_text

Javier Loureiro

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 19 2025 09:52:00
Script start
Timing: Jan 19 2025 09:52:00
Module start 'layout'
Timing: Jan 19 2025 09:52:00
Module start 'content'
Timing: Jan 19 2025 09:52:01
Module end 'content'
Timing: Jan 19 2025 09:52:01
Script end

Main resources:

Total runtime1.5669 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 590.1641152.6094
Module start 'layout' 0.00570.0035 742.773439.3984
Module start 'content' 0.00921.5565 782.1719538.5234
Module end 'content' 1.56570.0011 1,320.695312.2031
Script end 1.5668  1,332.8984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2099160.0002
Check MTime0.00140.0892160.0001
Mysql Total
Database connection0.00070.046310.0007
Mysqli_queries1.514496.6495570.0266
Looping result0.00090.0593550.0000
Template Total1.528997.620.7645
Template load0.00210.131420.0010
Template processing1.526997.446420.7634
Template load and register function0.00020.011710.0002
states
state_id_array0.00120.078110.0012
state_identifier_array0.00160.099820.0008
Override
Cache load0.00170.1081180.0001
Sytem overhead
Fetch class attribute can translate value0.00100.064920.0005
Fetch class attribute name0.00100.060850.0002
XML
Image XML parsing0.00350.225920.0018
class_abstraction
Instantiating content class attribute0.00000.000860.0000
General
dbfile0.00330.2135220.0002
String conversion0.00000.000940.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/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: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs