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?
|