Menu

#2955 Content plugin

Parent Category:
DPCalendar
Category:
Joomla plugins
Last Updated:
Allon Moritz, Tuesday, 02 May 2023 15:49
Created:
Wednesday, 23 September 2015 00:14
Hits:
9320

DownloadPHP 7.4PHP 8Joomla 3.10Joomla 4.4Joomla 5

Introduction

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.

Render events in content

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}}

Parameters

The following parameters can be used within the {{#events}} block:

  • calid
    The calendar ID the events should be filtered. If you want all, including the external ones, put root. If you want an external one like your Google calendar, put g-3, where 3 is the ID of the external Google calendar in the Google plugin.
  • eventid
    The single event ID which should be shown
  • limit
    How many events should be shown
  • my
    Should only my events be shown where I'm the author or attendee of, value has to be 0 or 1
  • order
    The order field.
  • orderdir
    In which order direction they should be shown, as or desc.
  • tagid
    A comma separated list of tag ID's to filter for.
  • featured
    If only filtered events should be included in the list.
  • startdate
    The start date, can be relative like "-1 week" or an absolute ISO 8601 date like 2016-09-23.
  • enddate
    The end date, can be relative like "-1 week" or an absolute ISO 8601 date like 2016-09-23.
  • locationid
    A comma separated string with ids of locations.

For more information about the mustache syntax can be found in the Output rendering chapter.

Render events in contact details page

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.

Render bookings in contact details page

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.

Options

Only Tickets [Type: Radio] [Default: No]
Only for attendees with an active ticket.
The following options are available:
  1. Yes
  2. No

Options

Show Events In Contact [Type: Radio] [Default: Yes]
Show the events in the contact details page?
The following options are available:
  1. Yes
  2. No
Show Bookings [Type: Radio] [Default: No]
Show the bookings in the contact/user details page.
The following options are available:
  1. Yes
  2. No

Comments (0)

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.