Attributes

Managing stories, notifications and other Editorial features

Written By Aditya Sanjit (Super Administrator)

Updated at January 23rd, 2023

In a dictionary if you consider the word you're looking up to be a 'key', then it's definition/meaning can be considered the 'value'. The word and its definition form a 'key-value pair'. A similar idea is used in Quintype to create Attributes.

Attributes are key-value pairs that can be used to customize various aspects of a Quintype based website.

Just like in a dictionary a word can have multiple meanings - an attribute key can be paired with more than one value. An attribute key could also be paired with one or more Entities.

Couple of the common uses of Attributes are to control the appearance of a certain story in the front-end of your website, or control which stories are displayed to which users.

These controls can be at a story level or at an individual card level.

In the first use case, let's say your front-end has a set of templates that are used to display different kinds of stories. You can create a key-value pair that ties a key, say 'Template-14', to a certain template definition. All stories that have the attribute of 'Template-14' will then be displayed using the template definition associated with the 'Template-14' key.

In the second use case, you can restrict access to a specific story - to certain types of users/readers. For example, you have a 16-part serialized story and part 9 of the series is only displayed to readers who have completed reading part 8. Whether a user has completed part 8 could be decided elsewhere.

Attributes at the card level function in a similar way - only they are limited to a specific card.

Going back to the two use cases we just looked at, in the first use case you could control the alignment of images (in the front-end of your website) in a card using a card level Attribute. In the second use case, you could display an extended version of a story to specific users using card level Attributes.

To create an attribute:

  1. From the main menu navigate to ManageSettings, and open the Attributes tab.
  2. Click the Create button located at the top right corner of the page.
  3. To add the attribute at the story or card level, select the appropriate value under Type.
  4. Enter the attribute name in Name.                  
  5. If the Type is Entity, then enter the following: Select the Level of entity selection as Single or Multi. Select the entity type/types as Values. This will ensure that the entity story attribute can hold single or multiple entities as attributes from the selected story types. Click Save Attribute.
  6. Or if Type is Multi Valued Strings, enter the possible values under Values.
    Entities can also be added under Attributes; however, the values for this need to be present in the database first.