Content Feed Plugins

These plugins provide a dynamic feed of content based on criteria supplied by the plugin.

Content Feed

This is a generic plugin that can pull in Articles, Events, Press Releases, Staff Member Profiles and Job Posts. It displays a "masonry" style feed (i.e. staggered) that loads 10 items at a time until all items have been loaded. The plugin allows for multiple filters to be defined, which allows the user to change to content displayed in the plugin. The plugin allows for an optional header.

To load content, the plugin requires at least one filter be defined. If only one filter is defined, this will load by default and no filter buttons will be displayed. Filters are sorted according to the order field (lowest to highest), with one exception: if a filter is marked as default, it will be displayed first and by loaded when the page loads. Filter buttons will be displayed with the given label.

The most important part of a content filter is the query. This is the criteria that will be used to select content to display. Query criteria follow this pattern: parameter=value. Multiple criteria are delimited by an ampersand: &.

The following criteria may be used (in any combination) with the Content Feed plugin. Some combinations may result in no items being selected, so test different combinations to provide the desired results.

Parameter

Possible Values

Description

institute

one of: ai, aibs, aics, aifg

Limits content to items associated with the provided institute. These match the nickname field of the institutes. New options are available as institutes are added.

types

one or more of: Article, Event, PressRelease, StaffMemberProfile, Job Post. Multiple values are delimited by a pipe: |

Limits content to items of the given content types. 

tags

one or more of a list of tag names (case-sensitive). Multiple values are delimited by a pipe: |

Limits content to items that are tagged with the given tags. Content is included if it matches at least one of the tags.

exclude

one or more of a list of tag names (case-sensitive). Multiple values are delimited by a pipe: |

Excludes content by tag. Content is excluded if it matches at least one of the tags.

dates

Two dates in YYYY-MM-DD format, separated by a colon (:). Either date may be replaced with the word "now" to represent the current date. One date may be omitted to set no boundary.

Limits content to items with a display_date within the specified range. The keyword "now" allows filtering based on the current date and dates may be omitted to allow for "before ..." and "from ..." date ranges. The first date is inclusive and the second date is exclusive.

department 

one of a department name, spaces in names must be encoded (usually with a plus + sign).

Limits content to items associated with the given deparment (by name). This forces the "types" parameter to be StaffMemberProfiles only.

Deparments may be edited here: https://www.alleninstitute.org/documentation/content-feed-plugins/

ordering

one or more of: display_date, title, created, modified. Multiple items are delimited with a comma. Items may be prefixed with a minus sign to sort descending.

Set the sorting of the items in the list. This parameter does not filter items. Default is ascending order, use a minus sign to sort descending. 

limit

a positive integer

By default, results are loaded 10 at a time. If a different value is set for this parameter, more results may be shown at once. Generally limit=1000 is equivalent to "show all"

Examples:

This query selects all articles and press releases for the Brain Science institute for 2016, sorted newest to oldest:

types=Article|PressRelease&dates=2016-01-01:2017-01-01&ordering=-display_date,modified

This query selects all articles tagged "News" except those tagged "Blog":

types=Article&tags=News&exclude=Blog


Event Feed

This plugin works essentially the same as the Content Feed above with these exceptions:

  • Results are always filtered by type (type is auto-set to "types=Events")
  • Results are displayed in the Event list format
  • An optional toggle is provided to allow the Institute icons to be shown/hidden.


Staff Feed

This plusing works essentiall the same as the Content Feed above with these exceptions:

  • Results are always filtered by type (type is auto-set to "types=StaffMemberProfile)
  • Results are displayed in the Staff list format
  • An additional parameter is available:

Parameter

Possible Values

Description

department_required

None needed, use department_required=1

Use this optional parameter to limit the results to only those staff members with at least one department set. If this is not used, advisors may appear in the feed. No value is actually required (the presence of this parameter forces the behavior), but a value of 1 or true can be provided for consistency.

Departments may be edited here: https://www.alleninstitute.org/documentation/content-feed-plugins/

ADI Project Member Feed

This plugin works similarly to the Content Feed above, but supports a different set of parameters. It only ever loads content of type ADI Project Member.

Parameter

Possible Values

Description

tags

one or more of a list of tag names (case-sensitive). Multiple values are delimited by a pipe: |

Limits content to items that are tagged with the given tags. Content is included if it matches at least one of the tags or all depending on the value of the next parameter.

tags_method

one of "any" or "all"

Determines whether tag filtering requires at least one or all of the provided tags to be matched. This parameter does nothing if no tags parameter is provided. The default value is "any".

dates

Two dates in YYYY-MM-DD format, separated by a colon (:). Either date may be replaced with the word "now" to represent the current date. One date may be omitted to set no boundary.

Limits content to items with a display_date within the specified range. The keyword "now" allows filtering based on the current date and dates may be omitted to allow for "before ..." and "from ..." date ranges. The first date is inclusive and the second date is exclusive.

ordering

one or more of: sorting_name. Items may be prefixed with a minus sign to sort descending.

Set the sorting of the items in the list. This parameter only supports the "Sorting Name" or members (ascending or descending). This parameter does not filter items. Default is ascending order, use a minus sign to sort descending. 

limit

a positive integer

By default, results are loaded 10 at a time. If a different value is set for this parameter, more results may be shown at once. Generally limit=1000 is equivalent to "show all"

Blog Feed

The feed pulls in Articles which may have an image associated. There are three layouts available: "list of cards (2-column)" will show images, "list of titles (1-column)" will not show images, "list of titles (1-column w/ image)" will show images. If a layout shows images, this can be limited to only the first row of posts by checking the "limit images" box. Layouts that show images will only show an image on Articles that have one assigned.

Articles will be filtered to those matching all of the tags provided in the tags field. The default URL for these articles will be overridden (for this plugin only!) based on the location of the Application ID field. This id must match the ID of an app hook that is defined in the advanced settings of a page of the site (if it does not it will be deleted and the default URLs will be used.)