Forums / Setup & design / Override templates limitation

Override templates limitation

Author Message

Tristan Koen

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

Pirkka Hartikainen

Tuesday 29 July 2003 5:37:08 am

This struck as being odd to me as well.. there's a definite need for the possiblity of configuring different templates for viewing a given content node in different contexts!

Tristan Koen

Tuesday 29 July 2003 5:48:56 am

Perhaps the solution would be to add a
Match[view_mode]=... option?

Pål Øystein Carlsen

Monday 17 November 2003 7:33:12 am

I would also like the possiblity to display the latest articles, regardless of what folder/node they are placed under. Is this possible?

If anybody has done this I would be happy to get a hint as to how. Now all I am able to get is a context sensitive display of articles depending on what section (parent_node) I am in.