Virtual URL for Alternate View of Content

Author Message

adi h

Wednesday 28 May 2008 5:35:06 pm

Apologies if this question has been answered in another thread.

I am part of a team developing a book catalogue, and users of the catalogue are able to leave comments on any individual book. The 5 most recent comments are displayed inline on the 'full' view of the book, and underneath those comments is a link to show all comments (if there are more than 5). Comments are saved as child items to the book being commented on, and the 'all comments' view will paginate them at 40 per page. The URL structure is http://site/catalogue_items/[book]/ .

Now, we have a couple overrides set up as follows:

[catalogue_item]
Source=node/view/full.tpl
MatchFile=node/view/full/catalogue_item.tpl
Match[class_identifier]=catalogue_item

[catalogue_item_comments]
Source=node/view/comments.tpl
MatchFile=node/view/comments/catalogue_item.tpl
Match[class_identifier]=catalogue_item

And that works fine - the 'comments' view of the correct node shows when browsing to http://site/content/view/comments/[node_id], and the 'full' view of the book is shown at http://site/catalogue_items/[book].

The issue is that the URL for the 'comments' view is fairly unattractive comparative to the http://site/catalogue_items/[book] sibling.

Is there an easy way to map a Virtual URL or similar to something like
http://site/catalogue_items/[book]/comments/
while retaining support for both pagination and the breadcrumbs system?

Maxime Thomas

Sunday 01 June 2008 11:41:41 pm

Hi,

It may help :

http://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics/url_translation
http://ez.no/doc/ez_publish/technical_manual/4_0/features/multi_language_support_for_url_aliases

Max

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

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 15:58:02
Script start
Timing: Jan 18 2025 15:58:02
Module start 'layout'
Timing: Jan 18 2025 15:58:02
Module start 'content'
Timing: Jan 18 2025 15:58:02
Module end 'content'
Timing: Jan 18 2025 15:58:02
Script end

Main resources:

Total runtime0.0179 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.0051 588.0469152.6406
Module start 'layout' 0.00510.0022 740.687539.4766
Module start 'content' 0.00730.0089 780.164189.4922
Module end 'content' 0.01620.0017 869.656334.3047
Script end 0.0179  903.9609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002312.7207140.0002
Check MTime0.00116.0734140.0001
Mysql Total
Database connection0.00115.960510.0011
Mysqli_queries0.00189.996130.0006
Looping result0.00000.066410.0000
Template Total0.00137.410.0013
Template load0.00073.989210.0007
Template processing0.00063.348910.0006
Override
Cache load0.00052.785610.0005
General
dbfile0.004122.677080.0005
String conversion0.00000.038540.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