Example - From other sites

URL for third party content

When you want to show content from another site you own or from a third party, the Content Source  to use will be URL. You may have already seen this in use in Example - CSV Data, where a CSV file is pulled straight from an external source.

But such content doesn't always arrive nicely in a CSV file, so lets look at some other types of external content.

If its web content you are looking at, there is a good chance it comes in HTML. After pulling the content using the URL content source, we have options for working with that HTML. You could just use the Pass Through content transform, but that could get messy as it would also pass through all the page headers and boilerplate for the source. 

In practice, you need to be a little more sophisticated with the application of Content Transform.

  1. Selector - extract a section of the pulled (HTML) content
  2. Multi Selector - extract a multi dimensional array using selectors within selectors ... to however deep you want to go.
  3. Table From HTML - Multi Selector is complicated, if all you want is to get a table from the source, this can be a quick and easy solution.

Here is some content pulled from the ConcreteCMS documentation at https://documentation.concretecms.org/developers/toc.

This isn't particularly exciting content to pull from the ConcreteCMS documentation pages, but it serves a purpose to show it can be pulled into this site.

You may want to open up that page in another tab and with your browser developer console open on that tab to help follow what is being pulled.

To provide a basic overview, the Selector transform has been used. Settings:

  • css selector: main .col-content
  • Remove items: .container:first, .p:first
  • remove classes: container ccm-block-page-list-page-entry ccm-block-page-list-title

The css selector main .col-content gets us to the actual content column.

That would be usable in itself. But we then  remove the first container which is an introductory paragraph and also and empty paragraph.

View settings

Additional Pages

About this Sidebar

Creating a sidebar for a group of pages without messing about with stacks is an easy use-case for Universal Content Puller.

This sidebar is edited once, within the main addon page for Universal Content Puller.

It is then pulled into all UCP sub-pages using a UCP block.

The Content Source is Parent Page, set to pull the Sidebar area from 2 pages from the top. The Content Transform is Selector, set to remove container and row classes that, when unnecessarily nested, could mess up the Bootstrap grid. The Content Display is Plain, which just outputs the transformed text.

In the advanced settings, sanitization is disabled as we trust the source page and don't want to strip out any formatting or functionality from the pulled sidebar.