search sort_by attribute

Author Message

fintan sheehan

Friday 26 September 2008 1:12:36 am

Hello,
I am trying to sort by attribute (datetime) below but sort not working.
Is search sort_by limited to id and name in 3.10 ?

Thanks Fintan

{if eq($search_sub_tree[0],""))}

{set search=fetch(content,search,
hash(text,$search_text_keyword,
section_id,$search_section_id,
class_id,$search_contentclass_id,
class_attribute_id,$search_contentclass_attribute_id,
offset,$view_parameters.offset,
'sort_by', array('attribute', true(), '297' ),
limit,$page_limit))}
{else}

{set search=fetch(content,search,
hash(text,$search_text_keyword,
section_id,$search_section_id,
subtree_array,$search_sub_tree,
class_id,$search_contentclass_id,
class_attribute_id,$search_contentclass_attribute_id,
offset,$view_parameters.offset,
'sort_by', array('attribute', true(), '297' ),
limit,$page_limit))}
{/if}

{set search_result=$search['SearchResult']}

{set stop_word_array=$search['StopWordArray']}
{set search_data=$search}

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 15:53:02
Script start
Timing: Jan 18 2025 15:53:02
Module start 'layout'
Timing: Jan 18 2025 15:53:02
Module start 'content'
Timing: Jan 18 2025 15:53:03
Module end 'content'
Timing: Jan 18 2025 15:53:03
Script end

Main resources:

Total runtime0.7390 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0087 589.6875152.6250
Module start 'layout' 0.00870.0045 742.312539.4453
Module start 'content' 0.01330.7243 781.7578406.2188
Module end 'content' 0.73760.0014 1,187.97668.1641
Script end 0.7390  1,196.1406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.4809160.0002
Check MTime0.00150.1973160.0001
Mysql Total
Database connection0.00080.114610.0008
Mysqli_queries0.693793.8627460.0151
Looping result0.00040.0573440.0000
Template Total0.701895.020.3509
Template load0.00210.277920.0010
Template processing0.699794.676920.3498
Template load and register function0.00020.028410.0002
states
state_id_array0.00110.145310.0011
state_identifier_array0.00110.152420.0006
Override
Cache load0.00170.2284300.0001
Sytem overhead
Fetch class attribute can translate value0.00080.112310.0008
Fetch class attribute name0.00050.071310.0005
XML
Image XML parsing0.00010.015610.0001
class_abstraction
Instantiating content class attribute0.00000.000510.0000
General
dbfile0.00140.1873100.0001
String conversion0.00000.001640.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
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs