This is the documentation for concrete5 version 5.6 and earlier. View Current Documentation

Attributes are a way to bind data to items like Pages, Users and Files. Like blocks, attributes are typed and can store and present different data depending on these types. Unlike blocks, attributes are meant to be most data about items.  Additionally, blocks are only available for pages, while attributes are available for pages, files and users. (Additionally, you can make attributes available for your own custom objects, as well.) Finally, attributes are built into concrete5's searching and listing frameworks, making it easy to search and sort objects by attribute values.

Terminology

Attribute Keys

The AttributeKey object is the concrete5 object that holds information about a particular attribute. Any time you use concrete5 create a new attribute for a user, page or file, you're creating a new AttributeKey object. 

Learn more about attribute keys.

Attribute Categories

Every attribute key also has an attribute category. The attribute category is the object that it is bound to. Built-in page attributes like "Meta Title" and "Exclude from Nav" have an attribute category of "page." File attributes like "width" and "height" are part of the "file" attribute category. Every category of attribute keys has an object that extends the AttributeCategory object. Those who want to use the built-in attributes for their own objects will need to understand the attribute category object. 

Learn more about attribute categories.

Attribute Types

Finally, every attribute key must also have a type. The AttributeType object determines the way that the attribute key presents and stores its data. Attribute Types include objects like "Rating", "Textarea", "Number", etc... Those who want to extend the attributes system to store new types of data, or customize the presentation layer for existing attributes will need to understand the AttributeType object.

Learn more about attribute types.

 

Loading Conversation