is it possible to create more than one view for same object?

Author Message

Tofig Hamidov

Monday 05 July 2004 4:39:10 pm

Dear colleagues,

I begin experimenting with EZ and just completed 'Building an EZ publish site' manual. In the building news archive section of the website they used quite interesting approach and instead of making another object they just created another representation of the news folder (archive view). I was wondering whether it is possible to create more than one view for same object. Something like 'last month archive' and 'complete archive' views for example... Does anyone have ever done something like that?

Thanks in advance!

Tofig

Paul Borgermans

Monday 12 July 2004 12:30:45 pm

I hope you already found this out, but yes it can fairly easily be done.

One way is to create new viewmodes (other than full, line, ..) by creating a new template in the <b>/design/<yourdesign>/templates/node/view</b> directory. You can then also use overrides on this new "view mode".

Another way is to use userdefined parameters, eg

http://www.example.com/content/view/full/(fullmonth)/yes

and use the value set in $view_parameters.fullmonth to change the template logic accordingly.

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

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 12:51:48
Script start
Timing: Jan 19 2025 12:51:48
Module start 'layout'
Timing: Jan 19 2025 12:51:48
Module start 'content'
Timing: Jan 19 2025 12:51:49
Module end 'content'
Timing: Jan 19 2025 12:51:49
Script end

Main resources:

Total runtime1.3532 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 589.4141152.6563
Module start 'layout' 0.00730.0047 742.070339.5078
Module start 'content' 0.01201.3396 781.5781523.8281
Module end 'content' 1.35160.0016 1,305.40638.2500
Script end 1.3532  1,313.6563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2373160.0002
Check MTime0.00130.0956160.0001
Mysql Total
Database connection0.00080.059810.0008
Mysqli_queries1.302096.2122540.0241
Looping result0.00070.0500520.0000
Template Total1.313297.020.6566
Template load0.00190.137120.0009
Template processing1.311396.903720.6557
Template load and register function0.00030.020510.0003
states
state_id_array0.00100.071210.0010
state_identifier_array0.00130.097920.0007
Override
Cache load0.00140.1059160.0001
Sytem overhead
Fetch class attribute can translate value0.00050.040120.0003
Fetch class attribute name0.00140.100730.0005
XML
Image XML parsing0.00060.046520.0003
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00100.0731170.0001
String conversion0.00000.000840.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/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
1content/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: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs