Snippets in Campus Events
Campus Events offers the option of integrating event data into external websites and web applications using event snippets.
A snippet is a small piece of code that is embedded into the desired website or web application. Depending on the configuration in the Campus Events backend, the relevant event details are displayed automatically. This means, for example, that events from Campus Events can be displayed on an external website and automatically kept up to date.
Easy integration
Administrators can configure the content, layout and filtering of the snippet directly in the Campus Events backend. All that is then required is to copy and paste a single line of code into the relevant web page.
You can find the code in the list view of the snippets, under Snippets > Configure Snippets, in the ‘Snippet’ column.
Integration is possible regardless of the technology used to create the target page. Event snippets can, for example, be integrated into websites based on a content management system (CMS) such as TYPO3 or WordPress, as well as into traditional HTML websites or other web applications.
Add event snippet
General information
| Title | Description |
|---|---|
| Client | Select a client for whom you have authorisation to manage the data record in the backend. |
| Name | Title of the snippet for the backend and frontend. The name is set as the title in the HTML to display a heading in the frontend. For example, if the name is ‘All events’, this appears in HTML as <title>All events</title>. |
| Active | Checkbox to activate the snippet. |
| Items per page | Number of events per page. If there are more events than the specified number, the list will be split across several pages. |
| Note if no entries are found | Displays a message on the front end if no entries can be found. |
| Permitted domains | Permitted domains, e.g. *.example.com|*.example.de |
Object selection
Select the information to be displayed for the events. Define the formatting of the event snippets.
| Title | Description |
|---|---|
| Object | The type of records to be displayed. Currently, only events are available for selection. |
| Visible object attributes | Selection of which metadata from the records should be displayed. For example, the event title, the date or time period of the event, the venue(s), etc. |
| Sort by | Add one or more sorting options for the front end. |
| Show dates | If selected, all individual dates are displayed; otherwise, only the start and end dates of the event are shown. |
| Description: Enable HTML | If selected, the description is displayed with all formatting; otherwise, it is displayed as unformatted text. |
| Description: Maximum length | Has no effect if HTML has been enabled for the description. Leave blank to display the full description. |
Object filter
Set filter criteria for selecting events to show only the relevant events in the list view.
| Title | Description |
|---|---|
| Object attribute | Configuration option for displaying specific events. For example, only events with target group X |
Individual CSS customisations
You can use your own CSS to customise the event snippet.
| Title | Description |
|---|---|
| Use default CSS | If selected, the default CSS for snippets will be used in addition to the custom CSS. |
| URL for custom CSS | A URL for a custom CSS file can be entered. |
| Custom CSS (inline) | Enter CSS directly in Campus Events. |
Note
We accept no responsibility for how the snippets are displayed on external websites.
If the snippets are not displayed as intended on your website, the custom CSS must be adjusted accordingly in the backend. If necessary, this adjustment can be carried out by the relevant administrator or developer.