Object content.

Author Message

Pavel Konovalov

Tuesday 28 November 2006 8:06:01 am

Hi 2 all!
Please forgive to me my illiteracy.
I have an object:

$my_article_list = eZPersistentObject::fetchObjectList(	eZContentObject::definition(),                                                
										$fields,
                        	                				$conditions, 
                            	            				        $sorts, 
                                	        				$limits,
				                    	                        $asObject, 
                				        	                false, 
                                					        null, 
                                        					$add_conds_sql);

How I can get access to the "title" or "intro" of each aticle?

Are you gangsters?!
No, we are Russians.

Kristian Hole

Tuesday 28 November 2006 8:25:23 am

It would be something like this:


forach( $my_article_list as $article )
{
     $dataMap = $article->attribute('data_map');

     // Getting the text depends on the datatype
     $titleText = $dataMap['title']->attribute('content');

     // For intro text see:
    // http://serwatka.net/en/blog/ezxmltext_how_to_store_and_ouput_your_content
}

Additional info here:
http://serwatka.net/en/blog

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Pavel Konovalov

Tuesday 28 November 2006 8:52:12 am

Thank you, Kristian.
This is a solve of my problem;-)

Are you gangsters?!
No, we are Russians.

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

Main resources:

Total runtime0.6089 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.0089 587.7891152.6094
Module start 'layout' 0.00890.0033 740.398439.4063
Module start 'content' 0.01220.5950 779.8047540.6797
Module end 'content' 0.60720.0017 1,320.484412.2031
Script end 0.6088  1,332.6875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.5694160.0002
Check MTime0.00150.2531160.0001
Mysql Total
Database connection0.00140.235810.0014
Mysqli_queries0.553290.8602570.0097
Looping result0.00050.0789550.0000
Template Total0.570093.620.2850
Template load0.00210.344920.0010
Template processing0.567893.260920.2839
Template load and register function0.00010.023310.0001
states
state_id_array0.00110.178410.0011
state_identifier_array0.00070.117220.0004
Override
Cache load0.00170.2788190.0001
Sytem overhead
Fetch class attribute can translate value0.00050.079820.0002
Fetch class attribute name0.00200.327550.0004
XML
Image XML parsing0.00220.356220.0011
class_abstraction
Instantiating content class attribute0.00000.002060.0000
General
dbfile0.00570.9354220.0003
String conversion0.00000.001540.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
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/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: 18
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs