Embedding a Feed or Widget
Many social media and other platforms offer embeddable widgets so that a feed or other content can be loaded onto your website page. The specific instructions for obtaining and configuring the widget vary from platform to platform, so read their instructions carefully, in addition to the steps on this page.
Common platforms and widgets include Twitter, Facebook, Instagram, ShareThis, and AddThis.
Once you have the embed code, you can either add it directly to a page's code, or you can make it an asset to place on multiple pages. Keep in mind that depending on your user level or access settings, you might not be able to access the source code of a page.
Because you are adding third-party code to an Modern Campus CMS page, the code may need to be modified to work with Modern Campus CMS. A transformation error indicates that the embed code isn't XML-valid. If you need assistance, contact a web developer at your institution.
Source codeLink to this section
To add the widget or feed on a single page:
- Copy the embed code of the widget or feed.
- In Modern Campus CMS, navigate to Content > Pages.
- Find the page you want to add the widget to.
- Click on the page name.
- Open the editable region where you want to add the widget.
- In the What You See Is What You Get (WYSIWYG) toolbar, click the Source Code icon.
- Paste in the widget code where you want it to appear on the page.
- Click Save.
- Save your page and preview to make sure the widget is displaying how you want it to.
- Once you're satisfied with your changes, publish the page.
AssetsLink to this section
If you want the same widget or feed to display on multiple pages, consider making it a source code asset. Then the same asset can be placed on as many pages as you want, and if the original widget or feed needs to be changed, those pages are automatically updated.
- Copy the embed code of the widget or feed.
- In Modern Campus CMS, navigate to Content > Assets.
- Click +New.
- Click Source Code.
- Fill out the asset info and access settings.
- In "Asset Content," paste the widget or feed code.
- Source code assets must be XML-valid to work on a page. A common error with embedding feeds is Boolean attributes, or attributes that don't have a value assigned. For these attribute types, add the attribute name as the value, for example,
<script async></script>
should be written as<script async="async"></script>
. All "&" must be encoded as well.
- Source code assets must be XML-valid to work on a page. A common error with embedding feeds is Boolean attributes, or attributes that don't have a value assigned. For these attribute types, add the attribute name as the value, for example,
- Click Create.
- Publish the asset.
The asset can now be inserted onto pages.