*/ ?>

Oembed Page List Samples

The Oembed Page List allows you to do a lot of different things for displaying pages. It's very similar to the built-in page list, but you can pull from more sources on the page. It also has a lot more options for shortening the text displayed.

Content Truncation

There are two different ways that the content can be shortened when displaying.

  • You may shorten to a certain number of characters, the same way that the built-in page list block works.
    Please Note: when shortening by characters, HTML formatting is not preserved. Also, if the number of characters cuts off part of the URL, then display may not work as expected.
  • You can also choose to split using the page break button in TinyMCE. You must be using the Advanced, Office, or a custom layout for the rich text editor in order to expose the button. This method will preserve HTML formatting, a first for concrete5!
You can also specify what text will be displayed in the Read More link.

Multiple sources you can pull from:

  • An Area on the page. You may specify any Area on the pages. All blocks will be pulled from the Area and looped over. If it is an Oembed Content or a regular Content block, it's content is pulled and added to the output. After all blocks are checked, splitting and embedding are applied.
    Please Note: You cannot simply display an Area directly using this method in your templates. Oembed Content blocks in the area would use their own settings instead of the settings in the page list.
  • The Page Description. This is the same as most templates for the built-in Page List block.
  • A Page Attribute. When installed, a Page Attribute set is created called "Oembed Page Attributes." Attributes added to this set will be available to choose in the block edit form. Attributes of types Checkbox, Date/Time, Image/File, Number, Rating, Link Selector, and Address will be ignored. They may be parsed in 3 different ways:
    • As a Single URL. For regular text fields. The content of the attribute will be passed directly to the Oembed Helper and output.
    • As a Multiple Select. This option will loop over the options selected in the Attribute. Each option will be passed to the Oembed Helper and parsed as a Single URL. If you are using a custom multi-select Attribute Type, you will need to adjust the template to pass in the correct value from each option.
    • As Rich Content. Attribute will be read as the regular Oembed Content block is. URLs wrapped in %% or alone in a paragraph tag will be rendered. You may use either a plain or rich text attribute. This is the only attribute parsing method that will obey the shortening parameters.

It also supports all the override options of the Oembed Content block as well. 

Preview The Templates and Options

The templates that come with the block match up with the default and "Blog List" templates from the core. To see how the different options and templates look, follow the links below.

It may not look like it, since each preview shows vastly different content, but each one uses the same two pages to output the content. The attributes, description, and page content all have different links. Yet all the previews except for the "Blog List" template are using the default view for the block!

blog comments powered by Disqus