This article considers the insert view module as a means of adding a view to a page. With this method, you don't need a unique content type, you just need to enable the insert_view filter. This is probably the easiest way to insert a view into your page.
Assume that you have several members of your staff writing articles for your company site. Your articles happen to cover several topics and have been tagged accordingly. You have decided to write an article about the articles and want to include tables of articles through out your narrative.
Your approach is to introduce the first topic, talk about why that topic is important to your company, and then follow up with a table displaying the articles posted in the last month. You want the title, date, and author. Your narrative continues by introducing the next topic and why it is important to your company, another table is inserted and so on.
The easiest way for a non-programmer to insert Views within the body of a page narrative is to use the Insert_View module.
In the case of the insert_view module, the readme.txt file does a nice job explaining how to install and configure the module. The steps below reflect one way to install and configure the insert_view module. This "formula" is based on the tips and instructions found in the readme.txt file.
Create an input format. "To display views correctly, Insert View turns off caching for the input formats for which it is enabled. That means every node using this input format will not be cacheable. This can impact site performance. In these cases, it is recommended to create a special input format for use when inserting views."
- After enabling the insert-view module, go to site configuration > input format > add input format.
- Give it a name like "insert_view"
- Decide if this input format is going to be restricted to a specific role.
- Check the boxes for each filter you want to apply to this input format, including the insert view filter.
- Save the configuration.
Create a view. The insert_view module allows you to simply insert a view as is, in its default mode or you can be more specific. If you want to be more specific, please review the following insert_view filter configurations and plan accordingly.
[view:my_view] - Name of the view (this is not the title or the path).
[view:my_view=my_display] - When in the view's edit mode, locate the list of displays at the left side of the control area. "Defaults" will be at the top of that list. Hover your mouse pointer over the name of the display you want to use. A URL will appear in the status bar (at the bottom) of your browser. Everything after #views-tab- is the display ID.
Include an Argument
[view:my_view=my_display=1,2,3] - This passes a comma delimited argument to your chosen display.
[view:my_view==1] - This passes a comma delimited argument to the default.
Create a node.
- Type your content into the body of your node.
- Type the applicable filter. For example, assume you are using the page display of a view called "listtopic." This view requires a taxonomy term ID and you want term #25. In the body, you would type [view:listtopic=page_1=25]
- Repeat steps 1 and 2 if you want more.
- Select the applicable input filter (if you chose to create a separate input format)
This approach is fairly straight forward. If you aren't a programmer but want to manage how your text and views appear on the screen, you can try using an HTML to manage the layout. For example, if you have two lists, you can create a 2-column table and place an insert_view tag in each column. Here is an example http://postharvesthub.vudat.msu.edu/?q=node/18.