fetch ordered on publish date with google bar

Author Message

Joris Lint

Thursday 06 November 2003 3:30:02 am

How do I make a fetch on news articles ordered by ' published on' date.
And how can I show maximum of five with a goole bar under it to go to the next page of news articles. (a google bar is: [1][2][3]...)

Eirik Alfstad Johansen

Wednesday 12 November 2003 12:01:50 pm

Hi Joris,

Here are the bits and pieces. You'll have to glue them together yourself.

To sort articles by the date they're published, use the parameter "sort_by,array(published,false())" to sort articles from new to old, and "sort_by,array(published,true())" to sort from old to new (in a fetch function).

To show a maximum of five articles, use the parameter "limit, 5".

Getting a Google toolbar should not be a problem as this is included in the default node/view.tpl, so just copy that one and add the parameters above.

Good luck !

Sincerely,

Eirik Johansen
Netmaking AS

http://www.netmaking.no/

Sincerely,

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

Joris Lint

Tuesday 18 November 2003 12:26:05 am

Tx, this is what i needed.

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

Main resources:

Total runtime1.0082 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.0066 588.0469152.6406
Module start 'layout' 0.00660.0037 740.687539.4766
Module start 'content' 0.01040.9964 780.1641530.1328
Module end 'content' 1.00680.0014 1,310.29698.1250
Script end 1.0081  1,318.4219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3283160.0002
Check MTime0.00140.1347160.0001
Mysql Total
Database connection0.00090.091710.0009
Mysqli_queries0.960595.2687570.0169
Looping result0.00060.0584550.0000
Template Total0.976996.920.4885
Template load0.00300.300620.0015
Template processing0.973996.595620.4869
Template load and register function0.00030.026410.0003
states
state_id_array0.00070.071410.0007
state_identifier_array0.00140.135620.0007
Override
Cache load0.00240.2331190.0001
Sytem overhead
Fetch class attribute can translate value0.00070.068220.0003
Fetch class attribute name0.00160.159440.0004
XML
Image XML parsing0.00070.068220.0003
class_abstraction
Instantiating content class attribute0.00000.001140.0000
General
dbfile0.00090.0888160.0001
String conversion0.00000.001140.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs