should i extend article type in content class?

Author Message

Manu Gupta

Saturday 29 November 2003 3:22:02 am

hi, i am in design phase and learning EZ:

i would like to capture extra information when creating an article. (like country of origin, references, author2, etc) i go to setup->classes -> content->article and have added the extra details. now, in the templates i need to show the extra information. is this the correct way to do this?

should i create a new object type? or extend the article object type?

thanks
manu

Marco Zinn

Saturday 29 November 2003 5:11:16 am

You are doing perfect :)
Extend the article class with the attributes, that you need. They will appear in the admin site automatically, because the admin site uses no template and thus, ez just prints all attributes.
For the user site, you need to insert your new attributes in the templates for your article class.
go for Templates /node/view/full -> article and /node/view/line -> article and have a look at "attribute_view_gui".
Hope, this helps.

Marco
http://www.hyperroad-design.com

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 20:48:07
Script start
Timing: Jan 18 2025 20:48:07
Module start 'layout'
Timing: Jan 18 2025 20:48:07
Module start 'content'
Timing: Jan 18 2025 20:48:08
Module end 'content'
Timing: Jan 18 2025 20:48:08
Script end

Main resources:

Total runtime0.5781 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.0469152.6406
Module start 'layout' 0.00500.0026 740.687539.4766
Module start 'content' 0.00760.5692 780.1641523.0625
Module end 'content' 0.57680.0013 1,303.22668.1250
Script end 0.5781  1,311.3516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.5155160.0002
Check MTime0.00120.2110160.0001
Mysql Total
Database connection0.00090.152810.0009
Mysqli_queries0.535392.5907540.0099
Looping result0.00050.0864520.0000
Template Total0.546994.620.2735
Template load0.00210.357320.0010
Template processing0.544994.248620.2724
Template load and register function0.00020.027310.0002
states
state_id_array0.00130.222910.0013
state_identifier_array0.00140.247520.0007
Override
Cache load0.00170.2895150.0001
Sytem overhead
Fetch class attribute can translate value0.00050.094820.0003
Fetch class attribute name0.00100.175430.0003
XML
Image XML parsing0.00070.119020.0003
class_abstraction
Instantiating content class attribute0.00000.002130.0000
General
dbfile0.00180.3053160.0001
String conversion0.00000.001240.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/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: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs