Brandfolder

Brandfolder is a popular Digital Asset Management platform that offers several features to help marketing, branding, and creative teams to streamline their workflow and make it easier.

Along with providing storage for your digital assets, Brandfolder helps in organizing, manipulating, analyzing, and distributing the company's important digital collateral.

With its flexible architecture, it is possible to add a Brandfolder custom field extension to your stack that allows you to fetch assets from Brandfolder and display them into a field in your content type. Subsequently, while creating entries, you can select one or more assets as the input value for the field.

This step-by-step guide explains how to create a Brandfolder custom field extension for your content types in Contentstack. The steps performed are as follows:

  1. Create a Brandfolder account
  2. Add the Brandfolder custom field extension to your stack
  3. Use your custom field

Prerequisites

  1. Create a Brandfolder Account

    To use this extension, you need to create an account in Brandfolder. To do that, follow the steps given below:

    1. Visit the Brandfolder official website and create a new account. It is recommended to use the partnership account by purchasing the license.  
    2. The free trial account won't work as expected. View the plans offered by Brandfolder, signup with them, and get started. 

    Now, let's move ahead and set up our extension.

  2. Add the Brandfolder Custom Field Extension to your Stack

    1. Go to your stack, navigate to the Settings gear icon, and select Extensions.
    2. On the Extensions page, click on the + Add Extension button and then on Create new as shown below. Alternatively, you can click on the Create a new one link.

      create-custom-field.png

    3. On the Select Extension Type screen, select Custom Field.

      select-custom-field.png

    4. On the Create New Extension page, enter details in the fields as given below:
      1. Title: Provide a suitable title. For example, Brandfolder.
      2. Field data type: Select the data type in which the input data of the field should be saved in Contentstack. Select JSON in this case. 
      3. Multiple: Keep this unchecked.
      4. Hosting method: The hosting method will be set to "Hosted By Contentstack." This option allows the source code for the custom field to be displayed in the "Extension Source Code" field.
      5. Extension source code: Specify the extension code here. To get the code, contact our Support team.

        The support team will provide you with the source code. Copy the code from the index.html file located in the root folder and paste it in the Extension source code field.

        Note: In the downloaded code, inside the source folder, there's a brandfolder HTML file. Upload this file as an asset in Contentstack by following the steps mentioned in the Create/Upload asset article. After uploading the file, you'll get a URL in the asset details section, make note of this URL.

      6. Config parameter: Enter the following configuration details as the extension's config parameter:

        {
            "widgetUrl":  "<<widget_url>>",
            "popUpWindow":  {
            "height": 650,
            "width": 500,
            "left": 500,
            "top": 100
            }
        }
        The value for widgetURL is the URL of the brandfolder HTML file which you just uploaded as an asset.

    5. Click on Save. This creates your custom field. 

    Now, let’s understand how you can start using this custom field in your content type.

  3. Use Your Custom Field

    To use your custom field, you need to follow the steps given below:

    1. Create a content type by clicking on the + New Content Type. Provide a suitable name to your content type, an optional description, and click on Create and Add fields.

      create content type.png

      This leads you to the Content Type Builder page where you can add the relevant fields.

    2. Add the Custom field in your content type. Provide a name to it, for example, Brandfolder, and add other fields such as a single-line text box, and so on.

      add custom field.png

    3. In the Edit Properties pane on the right-hand side, select the custom field from the dropdown (that is, Brandfolder) and set the other properties of your custom field.

      custom field properties.png

    4. After adding other relevant fields in your content type, click on Save and Close. This will create your content type.
    5. Now open the content type and create an entry as usual. You will see the Brandfolder extension field in your entry as shown below:

      custom field in entry

    6. Click on Choose Assets. The first time you use this extension in your entry (by clicking on Choose Assets), it will ask you to enter your Brandfolder API key.

      You can get it by logging in to your Brandfolder account, clicking on your username, and selecting My Profile as shown below:

      my profile in BF

    7. Then, select Integrations from the left navigation panel as shown below:

      integrations my profile in BF

    8. Copy the API key and paste it in the field. You can then select images from your Brandfolder account and insert them directly into your entry as shown below:

      BF in action

Note: The number of items that can be selected depends on the size of the JSON that is to be stored, and currently, only 10 KB of data can be stored. This is due to the limitation of the JSON data stored via Custom Field. Refer to our Custom Field Limitation doc for more detail.

Was this article helpful?

Thanks for your feedbackSmile-icon

On This Page

top-arrow