Snippets in Campus Events
Campus Events offers the option of integrating data from Campus Events into websites or web applications using a small script (snippets). Snippets are a technical code snippet that is integrated into the website/application. At this point, data is output according to the configuration in Campus Events, so that events from Campus Events, for example, can be output automatically.
Admins can configure the content and display in the backend. It is then sufficient to copy and paste 1 line of code into the respective website.
The Campus Events "event snippet" can be used to display events on another website. It doesn't matter whether this website is set up with a content management system (CMS) such as TYPO3 or WordPress, or as a normal HTML page?
Event snippets are available for this case. An event snippet can be used in two forms: 1. as an HTML snippet or 2. as a JavaScript snippet.
Precise filter settings can be made for each event snippet so that only events that match certain filter criteria are displayed in the generated list.
Add event snippet
General information
| Title | Title Description |
|---|---|
| Client | Define authorisation to edit and view in the administration interface. |
| Name | A good name makes it easier to find the events snippet later in the administration interface. Campus Events uses Name to set the title in the event snippet in HTML. For example, if the name is "All events", it will look like this in HTML <title>All events</title>. Such metadata is important for search engine optimisation. |
| Active | Tick the checkbox to be able to use the snippet. If deactivated, a message is displayed in the preview: "Sorry, this snippet is currently not available." and no events are listed. |
| Objects per page | Limit the number of events per page. If there are more events than the specified number, the list is split into several pages. |
| Permitted domains | Allowed call of domains e.g. *.example.com|*.example.de |
| Note if no entries found | This setting ensures that the user interface of the website remains clear and informative, even if no events can be displayed. |
Object selection
Select the event information to be displayed. Set the formatting of the event snippet.
| Title | Event description |
|---|---|
| Object | Currently only event. |
| Visible object attributes | Select which attributes of an event are displayed: Title, subheading, event start, event end, event locations, organisers, presenters, sponsors, categories, target groups, description. |
| Sort by | Sort the order of events according to various attributes. Click on the + button below "Sort by" to add one or more sorting attributes: Name, subheading, event start, event end, event locations, organisers, moderators, sponsors, categories, target groups, description. |
| Show events | If selected, all individual dates are displayed, otherwise only the start and end of the event. |
| Description: Activate HTML | If selected, the description is displayed with all formatting, otherwise as unformatted text. |
| Description: Maximum length | Has no effect if HTML has been activated for the description. Leave empty for the complete description. |
Object filter
Define filter conditions for the selection of events to show only the matching events in the list view.
| Title: Title | Event description |
|---|---|
| Object characteristic | Event properties that can be used to filter events: Cancelled, Categories, Completed, Filter categories, Venues, Organisers, Presenters, Sponsors, Target groups, Event lists, Name, Event start, Event end. |
Individual CSS customisations
You can use your own CSS to customise the event snippet.
| Title | Title Description |
|---|---|
| Use standard CSS | If selected, the standard CSS for snippets is used in addition to the custom CSS. |
| URL for custom CSS | A URL to the custom CSS file can be stored. |
| Custom CSS (Inline) | Store CSS directly in Campus Events. |