Display:Auto and the Multi-View System

Last edited: 5/16/2011

In a previous Article, URL Paths, it was mentioned that there are two default views for module content: List and Detail. For some of our modules, however, additional views are needed. For example, clients often want a master list of all blogs, booklists or galleries in addition to a list and detail view for each one.

Creating these views from scratch is definitely possible, but proves to be burdensome because of the extra work involved in making sure all links point to the right place, setting up custom rewrite rules to map URLs to the right template, etc. MonkCMS has taken a lot of this tedious work off of your plate with the “display:auto” getContent parameter.

This parameter tells the CMS to show a different set of module content on the page depending on the URL. For an example of how this is done, see the URL Parameters section of the Blog API. To specify URL-dependent content, special “show” tags have been set up for modules with multi-view enabled. For the Blog module, they include (but are not limited to) the following:

  1. show_bloglist: Content displayed on the list of all blogs
  2. show_postlist: Content displayed on the list of posts for one particular blog
  3. show_detail: Content displayed on an individual blog post

Galleries and Booklists and  have a similar set of show options available, and other modules have variations that work best for their particular type of content. For a full description of available views for each module, consult the API reference for that module.

Full List of Modules with Multi-View functionality: