DownloadPHP 7.4PHP 8Joomla 3.10Joomla 4.4Joomla 5
The content plugin for DPCalendar allows to integrate a list of events into any content such as an article description. Additionally it displays events in the contact details page.
To show events in any content, the content author can use the mustache syntax of DPCalendar as described in the Output rendering article. The following example will print the next three events from the calendar with an ID of 42. It will render a list of paragraphs, each one with the title and date of the event.
{{#events calid=42 limit=3}}<p>{{date}} {{title}}</p>{{/events}}
The following parameters can be used within the {{#events}} block:
For more information about the mustache syntax can be found in the Output rendering chapter.
The plugin hooks into the contact details page and renders events where the linked user of the contact is the author of or the host. The events are rendered in a separate layout in the file /plugins/content/dpcalendar/tmpl/contact/events.php. If you want to change that, then you need to copy it to /templates/{your template}/html/plg_content_dpcalendar/contact/events.php and change it to your needs. Keep in mind that most styling can be done with CSS as we use the BEM Class naming strategy for easy element access.
When no contact events should be shown, then this behaviour can be disabled by an option in the plugin.
When the logged in user is a DPCalendar booking admin, check the ACL chapter for more details, then there is an option in the plugin to show the bookings in the contact details page. The bookings are rendered in a separate layout in the file /plugins/content/dpcalendar/tmpl/bookings/list.php. If you want to change that, then you need to copy it to /templates/{your template}/html/plg_content_dpcalendar/bookings/list.php and change it to your needs. Keep in mind that most styling can be done with CSS as we use the BEM Class naming strategy for easy element access.
Comments (0)