Help creating a group_by attribute fetch function

Author Message

H-Works Agency

Friday 29 December 2006 4:20:17 am

Hi all,

Does an advanced EZP user can tell me how could i create a custom fetch function that would fetch result grouped by childrens attributes ?

Thanx for the help.

Martin

EZP is Great

kracker (the)

Friday 29 December 2006 4:43:28 am

Learning about fetch, a very old introduction (good read).
<i>http://ez.no/ezpublish/documentation/customization/custom_design/database_connectivity</i>

I think after reading this I would seek to add the custom fetch (and or attributes),
I needed in the kernel as a ... proof of concept, possibly to be submitted back as a patch.
Files to read, 'kernel/content/function_definition.php', 'kernel/content/ezcontentfunctioncollection.php'

Default fetch functions,
<i>http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_fetch_functions</i>

Fetch Alias features,
<i>http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_functions/miscellaneous/fetch_alias</i>

<i>//kracker</i>

<b>Related threads</b>
<i>http://ez.no/community/forum/general/fetch_unique_content_on_some_attribute
http://ez.no/community/forum/general/fetch_list_group_by_or_unique_on_child_attribute
</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

H-Works Agency

Monday 01 January 2007 6:39:18 am

Ok thanx.

Its sad its not a built-in feature to be able to group per child attribute.

This would definitly solve the problem of managing the color/size/quantity in products in EZP.

EZP is Great

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:53:39
Script start
Timing: Jan 18 2025 20:53:39
Module start 'layout'
Timing: Jan 18 2025 20:53:39
Module start 'content'
Timing: Jan 18 2025 20:53:40
Module end 'content'
Timing: Jan 18 2025 20:53:40
Script end

Main resources:

Total runtime0.8079 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.0065 588.0469152.6406
Module start 'layout' 0.00650.0032 740.687539.4922
Module start 'content' 0.00970.7968 780.1797547.6484
Module end 'content' 0.80650.0014 1,327.828112.1250
Script end 0.8079  1,339.9531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4153160.0002
Check MTime0.00130.1597160.0001
Mysql Total
Database connection0.00100.122110.0010
Mysqli_queries0.749992.8162570.0132
Looping result0.00060.0766550.0000
Template Total0.777696.220.3888
Template load0.00220.270620.0011
Template processing0.775495.972220.3877
Template load and register function0.00010.011010.0001
states
state_id_array0.00070.084910.0007
state_identifier_array0.00130.157120.0006
Override
Cache load0.00180.2206290.0001
Sytem overhead
Fetch class attribute can translate value0.00090.109820.0004
Fetch class attribute name0.00100.126250.0002
XML
Image XML parsing0.00180.221320.0009
class_abstraction
Instantiating content class attribute0.00000.001860.0000
General
dbfile0.00210.2650250.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
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
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs