Universal Content Puller Attributes
Attributes to display and use content pulled with Universal Content Puller.
Universal Content Puller Attributes is an extension for Universal Content Puller. These attribute types work with previously stored Universal Content Puller settings.
Provided attribute types:
- UCP Stored Setting - display pulled content
- UCP Stored Setting Select - create a select, radioset or checkbox attribute populated from pulled content
UCP Settings can be stored using the button from any Universal Content Puller block or global settings edit dialogue and then selecting the Save to store option. This will create or update a stored setting.
All such stored settings are then available for use with these attributes.
UCP Stored Setting
The UCP Stored Setting attribute type has a minimal edit form to work with previously stored Universal Content Puller settings. The attribute edit form provides a simple select between all previously stored Universal Content Puller settings.
When a UCP Stored Setting attribute is displayed, the selected UCP settings are evaluated and the pulled content becomes the attribute view.
In its simplest form, this can use the core Attribute Display block, but you can use a UCP Stored Setting attribute in any other places you would display an attribute. When using the core Attribute Display block, multi-line formatting must be 'none'. Alternatively, use the Raw template bundled with this package.
When displaying a UCP Stored Setting attribute requires JavaScript assets to be loaded, for example, to show a chart, the block cache for any displaying block must be disabled (in Advanced settings of the edit mode menu) to allow the attribute view to load the assets.
UCP Stored Setting Select
The UCP Stored Setting Select attribute can be used anywhere you would use a core Option List (select, radioset or checkbox) attribute. The difference is that the attribute options are provided by pulling a UCP stored setting. For example, an attribute could be used to choose one or more entries from a list provided by a CSV file.
The UCP Stored Setting Select attribute type is configured similarly to a core Option List attribute, except that the options are pulled from a previously stored Universal Content Puller setting.
The stored setting should 'display' the pulled content as:
- A single dimension value/label list output by the Serialize display widget in php print_r format.
- An 2 dimension HTML table of 2 columns output with the Table display widget, where the first column is the value and the second column is the label.
- 2 dimensional JSON data output with the JavaScript Data display widget, where a table of 2 columns is output as a table or object In a data attribute of an empty <div> element.
The attribute edit form will then extract the value/label list and present it as a select, radioset or checkbox list to choose from.
Considerations on use
- Universal Content Puller's Ajax rendering is disabled.
- Pagination within pulled content is disabled. Where pulled content would have been paginated, the first page is used.
- The UCP Stored Setting and UCP Stored Setting Select attribute types can be used with categories other than Collection/Page, such as Users and Express, but are not enabled for such during installation. See Dashboard > System & Settings > Attributes > Types.