{module_calendar}

Description

This module renders either the News or the Events modules on a calendar.

{module_calendar} also supports named parameters.

Syntax

{module_calendar render="collection" collection="my_custom_collection_name" template="/folder/template.tpl" eventType="all/news/events" filter="all/classified" classificationId="classificationId" notemplate="false" targetFrame="_blank"}

Note: When using named parameters always wrap the individual parameters in double quotes. Also, do note that modules using named parameters do not work for campaigns just yet.

Parameters

  • render - for this module the value of this parameter can only be collection (if no value is specified the default will be collection). For more information on how to use this parameter take a look at the render parameter's article for more details on how to use it
  • eventType - the type of item to display. This parameter has 3 possible values:
    • all - display both News and Events
    • news - display only News
    • events - display only Events
  • filter - filtering criteria for display and can be one of the following:
    • all - all items
    • classified - displays an item in a particular category
  • classificationId -if you choose to display the classified calendar items specify the classification ID here
  • noTemplate – if you want to force the item not to use a site-level template when displayed pass in true, otherwise leave empty
  • targetFrame - specify the way the item opens when it is clicked. the possible values are:
    • _blank - open the new item in a new window
    • _self - open the new item in the same window
  • collection - use this if you need to access the module's Liquid output tags
  • template - render the module using a custom template. You can leave the value of the template parameter blank to suppress the original output and use Liquid output tags instead

This module can be rendered:

  • in its generic shape, as by default this module does not use a layout. Here is how the output looks like:
  • using Liquid collections - the output is a Liquid collection containing the days :

    "my_custom_collection_name": {
          "moduleName": "calendar",
          "moduleDescriptor": {
     	      "templatePath": "",
    	      "parameters": "0,a,,collection=\"my_custom_collection_name\"",
    	      "apiEndpoint": "/api/v3/calendar",
    	      "objectType": "-1",
    	      "objectId": "-1",
    	      "adminUrl": ""
          },
          "days": [
          {
            "day": "2014-09-01T00:00:00",
            "items": []
          },
          {
          	"day": "2014-09-12T00:00:00",
    	      "items": [
        	  {
    	    	  "startDate": "2014-09-12T00:00:00",
        		  "endDate": "0001-01-01T00:00:00",
    	    	  "objectId": 20460,
    		      "objectType": 48,
    		      "name": "First Appearance",
    	    	  "url": "/BookingRetrieve.aspx?ID=20460"
        	  }
          ]
    }

Examples

  • {module_calendar eventType="all" filter="all" notemplate="false" targetFrame="_blank"}
    - displays all the news and announcement items on the calendar view and opens the detail view in a new window when clicked
  • {module_calendar eventType="news" filter="classified" classificationId="12345" notemplate="false" targetFrame="_blank"}
    - displays the news item classified in the category with the ID 12345 and opens the detail view in the same window when clicked

Syntax

{module_calendar,what,filter,classificationId, notemplate, targetFrame}

Parameters

  • what - the type of item to display. This parameter has 3 possible values:
    • 0 - display both News and Events
    • 7 - display only News
    • 48 - display only Events
  • filter - filtering criteria for display and can be one of the following:
    • a - all items
    • c - displays an item in a particular category
  • classificationId -if you choose to display the classified calendar items specify the classification ID here
  • noTemplate – if you want to force the item not to use a site-level template when displayed pass in true, otherwise leave empty
  • targetFrame - specify the way the item opens when it is clicked. the possible values are:
    • _blank - open the new item in a new window
    • _self - open the new item in the same window

This module is rendered with these layouts

  • This module does not use a layout, here is how its output looks like:

Examples

  • {module_calendar,7,a,} - displays all the news items on the calendar view
  • {module_calendar,48,a,} - displays all the event (booking) items on the calendar view
  • {module_calendar,0,a,} - displays both events and news items on the calendar view