DittoCal ver. 1.1
The DittoCal snippet creates a monthly calendar for displaying your blog posts or any other document from MODx. DittoCal takes its data from a JSON page created by the Ditto snippet and then converts it into a calendar showing the most recent document first. The output also contains links to previous months so the user can view all of the posts.
Parameters
- &calSource
- default: none & required
- values: [ URI ]
- description: The path to the document created to output your posts in json format. (i.e. http://www.muddydogpaws.com/blog_json_output)
- &linkClass
- default: cal_link
- values: [ string ]
- description: Class for table cells (td) that contain links.
- &dayNameLength
- default: 3
- values: [ 0 | 1 | 2 | 3 | 4 ]
- description: How many characters of the week day name to display, 4 shows full name.
- &firstDay
- default: 0
- values: [ 0 | 1 | 2 | 3 | 4 | 5 | 6 ]
- description: Which day should start the week. 0=sunday, 1=monday, etc...
- &showPn
- default: 1
- values: [ 0 | 1 ]
- description: Show the previous/next links with your calendar.
- &debug
- default: 0
- values: [ 0 | 1 ]
- description: Set to 1 to display debug information.
- &ph
- default: cal_link
- values: [ string ]
- description: If set the output will be set to the placeholder name specified.
- &activeDay
- default: curDay
- values: [ string ]
- description: Class to apply to the post clicked on in the calendar.
In-Snippet Settings
In the snippet code there is an array named monthLinks. This array allows you to specify a link to a page on your site for each month of the calendar. When a link is specified, the month name will become the hyperlink. An example use of this would be if you have setup a page that contains the posts for the month of March 2006. You would add to the array like this:
$monthLinks = array( '2006' => array( '03'=>'http://www.muddydogpaws.com/march_2006'));