Tuesday 29 July 2003 4:57:49 am
Hi All, AFAIK, custom view modes have now been superseded by the override templates mechanism. As of this morning, I am not convinced that this is a good thing because of a limitation that I have now run into: I have a folder called "News". In this folder are a number of news categories. In each of these categories are a number of articles. On my landing page, I want to show a list of the latest 3 news items. The first item consists of the article title, an image and the intro text. The remaining two items only have the title. On the news page, I want to show all articles with a title and intro text. This simple scenario is very easy to implement, but it does highlight a weakness in the override templates approach.
My implementation takes the following approach:
1. Each of the main pages (News and Landing page in this scenario) have very simple templates. They simply fetch a list of folders that are displayed using:
{node_view_gui view=XXX content_node=$:item}
where XXX is a view mode that I would like to use.
2. I have two view nodes: latest (latest_class_1.tpl) and summary (summary_class_1.tpl). 3. The 'latest' and 'summary' view nodes are then responsible for displaying the appropriate fields for each view.
Now, as far as I can tell, this scenario CANNOT be implemented using override templates. That is unless the Match[view_offset]=XXX statement does this... I can't quite figure out what view_offset is. If I am wrong here, please will somebody tell me how. If I am right, would the ezCrew consider replacing the custom view mode functionality... It is really useful. Regards, Tristan
|