Working with Publications

In this guide we explore how to use the Control API to manage publications and how they can be customized by using customizations.

What are Publications

A publication is a medium to publish collected content. It can display a so called content feed which represents a moderated content queue. See the Collection Guide for more information about content and how it's collected.

Users can interact with the content items in a publication. For example, content items can be viewed in an overlay when a user clicks on them. The overlay will then show additional information about the selected content item.

What are Definitions

Each publication is based on a definition that defines its core functionality by means of specific properties. The following definition types are supported:

  • Vertical

    Publications based on this definition type will display content items in a vertical list, allowing content to be viewed from top to bottom and vice versa.

  • Horizontal

    Publications based on this definition type will display content items in a horizontal list, allowing content to be viewed from left to right and vice versa.

  • Full Page

    Publications based on this definition type will display content items in a grid. These type of publications have extensive branding features, like setting custom background images and logos.

Which Properties does a Publication have

All publications support the following customizable properties:

  • Language
  • Width
  • Height
  • Top Social Spots URL

Where the following properties depend on which definition type the publication is based:

  • Vertical- and Horizontal Widget
    • Auto Scroll
    • Fullscreen Button Link
    • Fullscreen Button Text
  • Full Page Widget
    • Background Image URL
    • Background Image Source (attribution)
    • Logo Image URL

What are Customizations

Besides customizing the properties of a publication, it's possible to go a step further and customize the appearance and behavior of a publication by providing custom CSS and JavaScript.

This is done by specifying the resource ID of a customization in the customCss and/or customJs property of a publication. In turn, the customization objects have a data property that contains the custom CSS or JavaScript as plain text.

Publication Output

In order for a publication to show content, it needs to know what to output, i.e. which publication content feed to show. All information required to display content is stored in the output property of a publication.

A publication can have multiple output objects, which allows it to display multiple content feeds. A user can then select the desired feed from the publication.

How to host a Publication

In order to expose the publication to users, a JavaScript code snippet must be implemented on the website hosting the publication. Add the snippet below to your website and replace {publication slug} with the slug property of your publication:

<div data-crowdynews-widget="{publication slug}">
    <script src="//widget.crowdynews.com/{publication slug}.js" async="true"></script>
</div>

How Publications, Definitions and Customizations fit together

Every publication has a required reference to a definition and can have an optional reference to a customization (CSS and/or JavaScript).

Every publication and customization belong to a single contract, see the Contract Guide for more information.

Publication, Definition and Customization Relation

Managing Publications and Customizations in the Control API