Making other views URL addressable

Author Message

Deane Barker

Wednesday 10 August 2005 8:14:07 am

eZ publish templating is very "object based," meaning each view is a view of an object.

But what if I want two full views of the same object?

I have a folder with full view that displays some detailed information about the last three items put into the folder.

I want an "archive" view that shows everything in the folder.

I could create another view ("archive"), but then how would that be URL-addressable? When a node is URL-addressed, it defaults to the "full" view, correct?

I know there's the "old" style URLs: (/content/view/full/107). Is this how I'd need to address the object?

Paul Borgermans

Wednesday 10 August 2005 8:21:31 am

Hi Deane

You could use custom parameters to achieve this while retaining the nice urls:

Say for example that your default (full) view is to display the latest, then you can add a link that reads like http://mysite.com/nice/url/tofolder/(viewmode)/archive

In your full view template check this custom parameter and use a switch in your full template, possibly calling the "archive" template with {node_view_gui ... view="archive"} if you want it in a separate template file.

hth

-paul

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

Deane Barker

Thursday 11 August 2005 11:34:36 am

I see, thanks.

But, general speaking, when someone hits the URL of a node, the "full" view is the only view they're getting, is this right?

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

Main resources:

Total runtime0.8248 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.0065 587.9141152.6250
Module start 'layout' 0.00650.0037 740.539139.4453
Module start 'content' 0.01020.8131 779.9844538.8516
Module end 'content' 0.82330.0014 1,318.835912.1563
Script end 0.8248  1,330.9922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4288160.0002
Check MTime0.00130.1561160.0001
Mysql Total
Database connection0.00090.104610.0009
Mysqli_queries0.772993.7103570.0136
Looping result0.00060.0701550.0000
Template Total0.787595.520.3938
Template load0.00240.288720.0012
Template processing0.785195.188320.3926
Template load and register function0.00010.010110.0001
states
state_id_array0.00110.131210.0011
state_identifier_array0.00100.118120.0005
Override
Cache load0.00200.2382220.0001
Sytem overhead
Fetch class attribute can translate value0.00060.068720.0003
Fetch class attribute name0.00120.145950.0002
XML
Image XML parsing0.00100.117020.0005
class_abstraction
Instantiating content class attribute0.00000.001360.0000
General
dbfile0.00100.1198230.0000
String conversion0.00000.001340.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/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