How to set up uoCal

The following tutorial details how to add a uoCal widget to your Drupal site, as can be seen on sites such as the Faculty of Arts, the Faculty of Science and the Faculty of Law.

Example of a uoCal widget showing how events are rendered on a site

Step 1: Set up uoCal

A user on your site with the role of administrator will need to do the following steps:

  1. Load the module “uoCal Import Configuration”.
  2. Navigate to Configuration. Under SYSTEM, click on Configure WebCMS.
  3. Expand the fieldset “uoCal Import Settings” and enter the organization ID.**

**To obtain the organization ID:

  1. Go to this link: http://www.uocal.uottawa.ca/en/events/organizations
  2. Find your entity or organization (faculty, department, etc.) and hover your mouse over the link. At the end of the link, you should see “%3A” followed by some other numbers. These last numbers are the organization ID.
    1. Example: For Health Sciences, the URL is http://www.uocal.uottawa.ca/en/calendar/2015-W22?f[0]=occasion_parent%253Afield_event_organization%3A130. Given this, the organization ID will be 130.

Step 2: Create a snippet for the “All events” button

  1. Navigate to Content. In the top-right corner, click on the tab Snippets.
  2. Select “Add snippet” and then “General Content Snippet”. In the page that appears, enter the following values in the corresponding fields.
    1. Title: No title is necessary.
    2. Body:
      1. Enter the text “All events” (in French: Tous les événements) and link it to http://uocal.uottawa.ca/en (in French: http://uocal.uottawa.ca/fr).
      2. Click on your newly added link and, from the dropdown “Styles”, select “Link: Button”. This will format it as a button.
    3. Label: Provide a meaningful label for your snippet (e.g. Home - All events button, or uoCal - All events button).

Step 3: Create the uoCal mini panel

  1. Navigate to Structure -> Mini panels.
  2. Add a new Mini panel with a B layout.
  3. Add the following content:
    1. Under “Content”, select “Dynamic Content List” and follow the steps detailed in the following article: “Creating a DCL for uoCal Events”.
    2. Under “Content”, add the general content snippet you created in Step 2 and set the View mode to “Content Body”.
  4. Save the Mini panel.

Step 4: Add the uoCal mini panel to your page and style it using Component Styles

Once you have added the mini panel to a page, you will need to add styling to it. To do so, follow the steps below:

  1. Click on the gear icon at the top-right of the mini panel and, under Style, click on Change. A new window will pop up.
  2. Select Component Styles and then click on the button Next.
  3. A page with several options will appear. Configure the following:
    1. Display title = Yes
      1. English title = uoCal
      2. French title = uoCal
    2. Container Type = Full
    3. Spacing = Left or Both Top and Left (according to placement)
  4. Click on the button Finish.
  5. Click on the button Update and Save to save your changes.

Step 5: Run the Cron to start importing events

If this is the first time you set up uoCal on your Drupal site, you will have to run the uoCal cron job first. To do so:

  1. Navigate to Configuration.
  2. Under SYSTEM, click on Cron.
  3. You will be presented with a page listing all the cron jobs. Find the one called "uoCal Import Configuration". At the right of it, click on "Run".

Note: You only need to do this step once. Events will be automatically imported every few hours from uoCal.

» Submit feedback
    Topics: 
  • Support
    Types: 
  • Tutorials
Back to top