A new template function has been created to allow you to include a dynamic Calendar for your Website.
This function will print a dynamic Calendar on your website. Its main purpose is to allow users to browse through old articles/issues by just clicking a specific date.
Calendar will be presented in the current site language. Function detects what language the website content is and so will be the Calendar.
- container: This attribute is mandatory. It allows you to define an unique html identifier (id) for the calendar container.
- url: This attribute is mandatory. Define the action of the Calendar once user click a date.
- clickable_dates: This attribute is optional. There are two possible values for this attribute: "articles" and "issues", being this last one the default. If you pass "articles" Calendar will be render to show highlighted all dates where at least one article is published (publish date). If you pass "issues" or nothing at all Calendar will be render to show highlighted all dates where an issue has been published.
- style: This attribute is optional. Sets a custom CSS style for the calendar, if not defined default style "yui-skin-sam" will be used.
- min_date: This attribute is optional. Sets the Calendar's minimum selectable date. Date format should be "mm/dd/yyyy".
- max_date: This attribute is optional. Sets the Calendar's maximum selectable date. Date format should be "mm/dd/yyyy".
What you can expect further in Newscoop releases.
- Possibility to choose date format (e.g. mm/dd/yyyy, yyy-mm-dd, etc.)
- Custom date highlighting.