This article sets out in more detail how to create a template override for the event monthly calendar page with a particular emphasis on the popup window/tooltip. It assumes that you have read and are familiar with the general introduction to template overrides.
We will cover the available methods and variables.
There are 3 files that control the layout:
- calendar.php
- calendar_body.php
- calendar_cell.php
calendar.php
This file controls the header and footer (which you should need to change) as well as the inclusion of the iconic navigation tool bar and the admin panel (i.e. the add events, show unpublished events block you see when you are logged in).
You probably won't want to change this file.
calendar_body.php
This is the file that does the main part of the layout of the calendar - again you probably won't want to change this file unless you want to add new css class attributes or remove the weeknumber colum. NB This file is particularily complicated for the Ruthin and Extplus layouts so change these with great care.
calendar_cell.php
This controls the content of the event within the day cell and the popup.
There are 3 methods you may want to modify in your template override:
- calendarCell_popup (if you are using the overlib tooltips - difficult to change)
- calendarCell_tooltip (if you are using the Joomla tooltips - preferred and easier to change)
- calendarCell (the main cell content)
The data about the event is in the variable $this->event
Available fields and methods:
- $this->event->startDate() - YYY-MM-DD formatted start date for the repetition
- $this->event->endDate() - YYY-MM-DD formatted end date for the repetition
- $this->event->title() - Title of the event repetition
- $this->event->content() - Description of the event repetition
- $this->event->useCatColor() - Does the event use the category colour?
- $this->event->catid() - Category id
- $this->event->catname() - Category name
- $this->event->getCategoryDescription() - Category description
- $this->event->created_by() - User id of the author of the event
- $this->event->hits() - hits count
- $this->event->published() - Is the event published or not
- $this->event->alldayevent() - Is the event repetition an all day event
- $this->event->noendtime() - does the event repetition have an end time
- $this->event->multiday() - is the event repetition a multi day event
- $this->event->access() - joomla access level for the event
- $this->event->location() - the event location - either a text field or an extended field based on the managed locations addon
- $this->event->contact_info() - the event repetition contact info field
- $this->event->contactLink() - a link to the event contact
- $this->event->extra_info() - the event repetition extra info field
- $this->event->published() - Is the event published or not
- $this->event->yup() - Year of start of event repetition
- $this->event->mup() - Month of start of event repetition
- $this->event->dup() - Day of start of event repetition
- $this->event->hup() - Hour of start of event repetition
- $this->event->minup() - Minute of start of event repetition
- $this->event->sup() - Second of start of event repetition
- $this->event->ydn() - Year of end of event repetition
- $this->event->mdn() - Month of end of event repetition
- $this->event->ddn() - Day of end of event repetition
- $this->event->hdn() - Hour of end of event repetition
- $this->event->mindn() - Minute of end of event repetition
- $this->event->sdn() - Second of end of event repetition
- $this->event->isrepeat() - Is the event a repeating event
- $this->event->repeatSummary() - a basic summary of the event's repetition pattern
- $this->event->prevRepeat() - a link to the previous repeat (or blank if none)
- $this->event->nextRepeat() - a link to the next repeat (or blank if none)