Using different views for full nodes depending on contenttype

390 views Asked by At

Think of 2 contenttypes (film, project). I have the homepage showing a few nodes of both. When clicking on a node i get the single node page (url of the node e.g. node/14).

I managed to output the single node page with views (path: node/% and contextual filter). But this is for all nodes regardless of what contenttype the node is. 'film' has different fields than 'project' so i need different views showing single nodes for each contenttype.

Is this possible?

Thanks Oliver

2

There are 2 answers

1
TheodorosPloumis On

Just use - except from the Nid Contextual Filter - a Filter Criteria for each content type.

Filter Criteria > Content: type

Views Filter Criteria > Content: type

0
Mihaela On

You can use the Page module, and create a page and 2 variants, one for the film and one for project and put condition in context menu. Other option will be to create 2 template pages for each type of node. The name of each file should be node--node_type_name.tpl.php