Fetching Content Objects on Custom Attributes

Author Message

Paul Ramirez

Friday 26 September 2003 8:56:21 am

Can someone explain to me how to use fetch in conjunction with attributes that are specific to a custom content object I have created? For instance, I have created a Story class which is much like an Article but has a field to capture the owner and the creation date. I want to fecth the 4 most recently created articles by a particular owner that have been published. I see that I have access to the main content attributes in the database through the fetch command but I need to filter on these other attributes that are part of my custom content class. Can I even do this with ezp? I am currently using ezp 3.0 but I would not be opposed to upgrading to 3.2 if it provides this sort of functionality. Thanks, in advance for any help or links anyone can provide.

Thanks,
Paul Ramirez

Eirik Alfstad Johansen

Monday 29 September 2003 3:39:41 am

Hi Paul,

The following documentation page describes how you can filter results based on attribute values:

http://www.ez.no/developer/ez_publish_3/documentation/development/libraries/ez_template/operators/data_fetch

Look near the end of the page. Good luck !

Sincerely,

Eirik Johansen
http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

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 22:26:09
Script start
Timing: Jan 18 2025 22:26:09
Module start 'layout'
Timing: Jan 18 2025 22:26:09
Module start 'content'
Timing: Jan 18 2025 22:26:09
Module end 'content'
Timing: Jan 18 2025 22:26:09
Script end

Main resources:

Total runtime0.0165 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.1797152.6406
Module start 'layout' 0.00560.0034 741.820339.4766
Module start 'content' 0.00900.0053 781.296989.3672
Module end 'content' 0.01430.0022 870.664130.3047
Script end 0.0165  900.9688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003017.8781140.0002
Check MTime0.00148.3630140.0001
Mysql Total
Database connection0.00074.517510.0007
Mysqli_queries0.002917.477330.0010
Looping result0.00000.121110.0000
Template Total0.001710.410.0017
Template load0.00105.963710.0010
Template processing0.00074.360310.0007
Override
Cache load0.00074.203110.0007
General
dbfile0.00031.682780.0000
String conversion0.00000.060640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs