Forums / General / Making other views URL addressable

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?

eZ debug

Timing: Jan 18 2025 19:11:23
Script start
Timing: Jan 18 2025 19:11:23
Module start 'content'
Timing: Jan 18 2025 19:11:24
Module end 'content'
Timing: Jan 18 2025 19:11:24
Script end

Main resources:

Total runtime0.8865 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0100 588.8281180.8359
Module start 'content' 0.01000.7093 769.6641543.9297
Module end 'content' 0.71920.1672 1,313.5938332.7500
Script end 0.8865  1,646.3438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4608210.0002
Check MTime0.00170.1873210.0001
Mysql Total
Database connection0.00190.215010.0019
Mysqli_queries0.804590.74281940.0041
Looping result0.00200.23101920.0000
Template Total0.847395.620.4236
Template load0.00260.298420.0013
Template processing0.844695.275620.4223
Template load and register function0.00010.012310.0001
states
state_id_array0.00090.104610.0009
state_identifier_array0.00120.134120.0006
Override
Cache load0.00230.2573220.0001
Sytem overhead
Fetch class attribute can translate value0.00140.161330.0005
Fetch class attribute name0.00150.169950.0003
XML
Image XML parsing0.00150.169130.0005
class_abstraction
Instantiating content class attribute0.00000.001260.0000
General
dbfile0.00400.4532340.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs