The JEM Embed plugin allows you to get JEM events as structured data (JSON). This makes it possible to show JEM events on other websites that are not running Joomla.
The data from the events are provided through a special URL. By adding parameters to this URL, you can control which events are returned and how they are displayed.
To configure the output from the source site see on this help page section 2–6, to embed the events on an other web site, see section 7.
JEM Embed works by calling a special Joomla URL. When you open this URL, Joomla returns a list of events instead of a normal webpage.
The base URL (mandatory):
https://domain.com/index.php?option=com_ajax&plugin=jemembed &group=content &format=json
You can add more parameters to this URL to filter events or change the output.
https://domain.com/index.php?option=com_ajaxresults in:&plugin=jemembed &group=content &format=json &token=YOUR_SECURITY_TOKEN &max=10 &venueids=1,2 &category=2,3,5
https://domain.com/index.php?option=com_ajax&plugin=jemembed &group=content &format=json &token=YOUR_SECURITY_TOKEN &max=10 &venueids=1,2 &category=2,3,5
When multiple parameters are used, only events that match all conditions will be returned.
To protect your data, access to the events is secured with a token.
&token=YOUR_SECURITY_TOKEN
Requests without a valid token will not work.
| Parameter | Meaning |
|---|---|
type=today |
Events happening today |
type=unfinished |
Ongoing and upcoming events |
type=upcoming |
Only future events |
type=archived |
Past (archived) events |
type=newest |
Newest events |
featured=on |
Only featured events |
featured=off |
Exclude featured events |
featured=only |
Show only featured events |
| Parameter | Options |
|---|---|
title |
on | link | off |
date |
on | link | off |
time |
on | off |
enddatetime |
on | off |
category |
on | link | off |
venue |
on | link | off |
| Parameter | Description |
|---|---|
catids=1,2,3 |
Only events from these categories |
venueids=1,2 |
Only events from these venues |
| Parameter | Description |
|---|---|
max=n |
Maximum number of events |
cuttitle=n |
Maximum length of the event title |
noeventsmsg=text |
Message shown if no events are found |
n must be a positive number| means you can choose one optionDownload and extract jemevents.zip
It contains:
jemevents.phpjemevents.jsjemevents-example.html (test page)readme.txtUpload these files to the external website:
jemevents.phpjemevents.js
Open jemevents.php and set:
Add this line before </body>:
<script src="/jemevents.js"></script>
Place this where the events should appear:
<div id="jemevents-container"></div>
The events will be loaded automatically.