Oembed Documentation

Install Options

When you are installing, you can set up the defaults for all new blocks for the system. You may update these at any time from your dashboard. The biggest thing here is to decide if you want to use embed.ly or not.

Modifying the Built In Blog

By far the main thing that I see people doing with this add on is to create better, faster blog posts. It's pretty simple to convert the existing blog from a default installation.

IMPORTANT NOTE:
Because you are removing the regular content block from composer, after you make this modification, you will NOT be able to edit older blog posts from composer. It is best to do this on a new site. You will still be able to update them using the front end tools, just not re-edit in composer.

Step 1

Step 1

Visit the Page Types dashboard Page. Choose "Defaults" and edit the "Blog Entry" page type.

Delete Content Block

Delete Content Block

We want to use the Oembed Content Block, not the existing content block, so that we have more options for each.

Add Oembed Content Block

Add Oembed Content Block

Leave the content empty, so that you don't have to replace it each time you create a new blog post. 

You can set the defaults to be whatever you want for options, and they will override the system defaults for all blog posts.

Add to Composer

Add to Composer

Now that you have an Oembed Content block on the page, add it to Composer.

New Block in Composer

New Block in Composer

Here is a sample of our new Oembed Content Block in Composer. 

There are a few things that you can do here. 

To insert a break for the blog list page, add this:

To embed a piece of media from a site that supports oembed, either put it on it's own line (bottom option shown) or surround it with the [ oembed ] [ /oembed ] syntax.

(Remove the spaces for proper parsing, they are added to keep this block from trying to convert them.)

Publish New Post

Publish New Post

Publish your new page, make sure that the content replacement is working.

Browse to Blog Page

Browse to Blog Page

Next, you will need to update the blog list to use the new Oembed system.

Delete Existing Pagelist

Delete Existing Pagelist

We want to use the Oembed list instead. There is not an Oembed thumbnail view template at this point, because there would not really be any content to replace in that view.

Add the new Oembed Page List Block

Add the new Oembed Page List Block

Here are the top options. They should be familiar to you if you've used the built in Page List block before.

Oembed Specific Page List Options

Oembed Specific Page List Options

There are several more options for where to get content from than on a regular page list block.  

1) Area On Page will use the specified area. There is no error checking to make sure that the area exists.

2) Page Description - This is the default for normal page lists.

3) Attribute - There are three different ways that attributes can be processed. Try each of them to see how they work.  There are sample attributes installed with the package. 

NOTE - to add an attribute to the list here, add it to the "Oembed Page Attributes" group in the dashboard.

Truncation can either split on a pagebreak, or by a number of characters. Beware - truncating by characters may make urls invalid by removing part of the path.

Options Tab

Options Tab

You can override any options set in the dashboard on a per-block basis.

These options override those of the Oembed Content blocks that are being displayed in the list.

Preview

Preview

To keep the editing interface clean, only the first page of results, and then only their titles are shown here.

New Page List

New Page List

This is the default Oembed Page List view.

Changing Custom Template

Changing Custom Template

Next, you need to set the custom template to the one that matches the built in blog template.

Blog Template Applied

Blog Template Applied

We've now completely converted our built in concrete5 composer blog into an Oembed powered blog.

blog comments powered by Disqus