object name pattern and ezdatetime

Author Message

Mads Ovesen

Wednesday 21 December 2005 1:31:55 pm

Hi,

I have a class of meetings with (among others) a startdate attribute (ezdatetime). I have chosen the startdate combined with the header of the meeting as the object name pattern of the class. The problem is that ez returns this pattern as a datetime + header. For examlple:
Wednesday 29 June 2005 2:00:00 pm Ph.d.-defense. In this way I cannot sort all the meetings in the backend by name, so that they appear a chronological order. Is there any way to remove the weekday name, so that they will be listed chronologically in the backend??

Thanks in advance!

/m

Mads Ovesen

Wednesday 21 December 2005 2:16:30 pm

Ok I solved this by overriding the folder.tpl in admin. All meetings must be children of a folder. I then check if the contentclass id of the children is that of the meeting class. If it is, I fetch the objects and sort them by the startdate attribute, else I sort them by $sort_array. Doesn't seem as the most elegant solution though.

/m

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 19 2025 07:20:00
Script start
Timing: Jan 19 2025 07:20:00
Module start 'layout'
Timing: Jan 19 2025 07:20:00
Module start 'content'
Timing: Jan 19 2025 07:20:00
Module end 'content'
Timing: Jan 19 2025 07:20:00
Script end

Main resources:

Total runtime0.0264 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.0079 589.2578152.6250
Module start 'layout' 0.00790.0039 741.882839.4453
Module start 'content' 0.01190.0120 781.328189.2266
Module end 'content' 0.02390.0025 870.554730.3047
Script end 0.0263  900.8594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002610.0066140.0002
Check MTime0.00124.5469140.0001
Mysql Total
Database connection0.00103.984210.0010
Mysqli_queries0.004416.762730.0015
Looping result0.00000.072410.0000
Template Total0.00217.810.0021
Template load0.00113.987810.0011
Template processing0.00103.816810.0010
Override
Cache load0.00062.372110.0006
General
dbfile0.00031.024180.0000
String conversion0.00000.152040.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