In this short article, I am going to look at using the view reference module as a means of adding a view to a page. With this method, you can create a content type that has an option to display content from a view. You can use a view as is or pass it an argument. The sections below present a sample scenario, steps for implementing view reference, and a layout tip.
You have a web site where you have multiple content authors contributing their ideas, information, stories, and so on. The content authors can post up to five types of content (designated, in the case, by a taxonomy vocabulary) each associated with 10 topics (also designated by a taxonomy vocabulary).
You want to put the content posts into context by writing a story or scenario that explains why the topic is valid and how it relates to the other topics on the site. You want your text to be followed by a list of related content posts that are tagged with the topic you are writing about.
This process can be accomplished several ways. For one, you could simply create a page view and use the header area of the page view to show story or scenario. In this case, let’s assume two things:
In order to use this method, you will need CCK, the View Reference Module, and Views installed. You will also need to know how to create content types with cck fields and views. If you need help with cck or views, check out the resources at the following links:
Below is a summary of the steps you need to perform in order to support the scenario above.
If you want to control the layout of the fields in your node, check out the composite module.
"Composite Layout allows your nodes to be displayed in complex layouts. Currently, two and three column layouts are provided. You can also add other nodes, blocks, and even CCK fields to your node's layout. The content area of your node is divided into zones and you decide what should appear in those zones. Zones are essentially the same as Drupal blocks, but they apply to nodes rather than the entire site."
You have some things to think about. For example, do you want to use arguments in your views? Also, don't forget your permissions. Who will be able to use this new content type? Remember to think through the process of how this strategy will be used and by whom. Sometimes the best solution for you is not the best solution for your users.