Advertising sustains the DA. Ads are hidden for members. Join today

Using an argument with Insert view

Last updated on
30 April 2025

The [view:myview=maxitem=firstargument] form can be very useful. For example, if you have a site with the following structure (every node except Home is a book page) :

  • Home
    • Transport
      • Cars
      • Taxi
      • Train
      • Airplane
      • Web sites
    • Culture
      • Museum
      • Library
      • Theatre
      • Web sites

Web sites nodes may seem redundant but they only show web sites about transport or culture. If you had no argument, you should create a view for each one (for example view_culture_sites and view_transport_sites).

One might say you wouldn't need the Insert view module as the Views module already allows you to create a page view with argument. That's true, but you won't be able to attach it to the book structure.

In the example, you need a node that can store URLs (either a new CCK node or a Jan's node, or whatever you want) and a taxonomy attached to it.

You then create your view with the Views module and define an argument on Taxonomy Term ID (or Taxonomy Term name).

In every Web sites node you insert the following tags :

  • [view:websites=100=transport] for the transport web sites page,
  • [view:websites=100=culture] for the culture web sites page.

Help improve this page

Page status: Not set

You can: