How to query just 2 attributes from 45 attribute ?!

Author Message

Selmah Maxim

Sunday 14 November 2004 3:27:49 am

Hi ...

I have big class have over 45 attribute, I wanna show up just 2 of it, so its will be slow when code make query for 45 attribute ... i need to get just 2 attributes ?!

Felix Laate

Monday 15 November 2004 1:17:57 am

Hi there..

If I understand you correctly, you could just create a view and use something like:

{section show=$node.object.data_map.NAME_OF_ATTRIBUTE_1.content.is_empty|not}            
        {attribute_view_gui attribute=$node.object.data_map.NAME_OF_ATTRIBUTE_1}
{/section}

{section show=$node.object.data_map.NAME_OF_ATTRIBUTE_2.content.is_empty|not}            
        {attribute_view_gui attribute=$node.object.data_map.NAME_OF_ATTRIBUTE_2}
{/section}

for the 2 attributes you want to be shown..

felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.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 19:28:58
Script start
Timing: Jan 18 2025 19:28:58
Module start 'layout'
Timing: Jan 18 2025 19:28:58
Module start 'content'
Timing: Jan 18 2025 19:28:59
Module end 'content'
Timing: Jan 18 2025 19:28:59
Script end

Main resources:

Total runtime1.5265 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.0069 589.1797152.6406
Module start 'layout' 0.00700.0034 741.820339.4766
Module start 'content' 0.01031.5147 781.2969518.7969
Module end 'content' 1.52510.0014 1,300.09388.2813
Script end 1.5265  1,308.3750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2235160.0002
Check MTime0.00150.0963160.0001
Mysql Total
Database connection0.00080.051010.0008
Mysqli_queries1.482497.1089540.0275
Looping result0.00060.0373520.0000
Template Total1.488797.520.7444
Template load0.00220.141220.0011
Template processing1.486697.383920.7433
Template load and register function0.00020.009910.0002
states
state_id_array0.00170.111310.0017
state_identifier_array0.00190.123020.0009
Override
Cache load0.00180.1149120.0001
Sytem overhead
Fetch class attribute can translate value0.00050.033120.0003
Fetch class attribute name0.00140.093330.0005
XML
Image XML parsing0.00060.041920.0003
class_abstraction
Instantiating content class attribute0.00000.000830.0000
General
dbfile0.00070.0488160.0000
String conversion0.00000.002140.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs