# 3.5 Categories

***

Categories are a way of grouping your posts based on their content within a Survey.\
The setup in this guide is demonstrated in the below video as well. You can watch and follow the guide at the same time!

***

### Video setup guide

{% hint style="info" %}
Video coming soon
{% endhint %}

***

### Setup Guide

To access the Categories configuration page, on the sidebar, click on ***Settings***

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2FZOWNT6bdpIGM0iMR2GqH%2F6.8.1.png?alt=media&#x26;token=c0c46d23-d26d-4656-9e78-9346e642688f" alt="Settings button in Ushahidi side bar."><figcaption><p>Settings button in Ushahidi side bar.</p></figcaption></figure>

***

Then, click on ***Categories.*** You’ll be redirected to a page where you can manage categories on your deployment.

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2FivvKu28Qf727PiaIwfS3%2F3.5.14.png?alt=media&#x26;token=7ca9ece6-dd19-4790-a10d-1c3292727fac" alt="Categories section in Settings"><figcaption><p>Categories section in Settings</p></figcaption></figure>

***

## 3.5.1 Adding and Configuring Categories <a href="#id-3-5-1-adding-and-configuring-categories" id="id-3-5-1-adding-and-configuring-categories"></a>

Unlike previous Ushahidi platform, your deployment **DOES NOT** come with pre installed/set-up categories. You will need to create this on your new Ushahidi deployment. Categories are now treated as custom fields within a Survey. This gives you the flexibility to add certain categories to some surveys, but not others.

There are two ways to create new categories.&#x20;

***First way to create categories:*** Navigate to ***Settings → Categories.*** Click on the ***Add Category button*** as shown below.

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2FVM59Y6XjMeu7cKs22Sza%2F3.5.2.png?alt=media&#x26;token=19f8eb10-91d4-40d7-9297-cfd87a0ba6a2" alt="Click on &#x27;Add Category&#x27; button to add a category."><figcaption><p>Click on 'Add Category' button to add a category.</p></figcaption></figure>

***

***Add the following details to the form***

* ***Category Name:*** Give your category a name that will appear on your homepage and when users are creating new posts.
* ***Description:*** You can provide a brief description of what kind of information you will fall under this category
* ***Child / parent settings***: You can choose to set any category as a “child” to another, creating a hierarchy within the categories themselves, and will reflect this in their positioning on the sidebar.
* **Default language:** Click on the drop down menu  to select your preferred default language
* ***Roles***: You can opt to set your category as visible to specific user roles on your deployment here. This list is populated based on custom roles created. More on [Roles here](https://docs.ushahidi.com/platform-user-manual/4.-managing-people-on-your-deployment/4.1-roles).&#x20;

In the upper right corner of the category page, you will see the default language that your deployment is currently in.&#x20;

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2FM0AT56gRoaie02q525T2%2F3.5.3.png?alt=media&#x26;token=50bca649-85aa-4ab5-9b59-a4f10a782c3b" alt="Add Category Form - to add the necessary details, such as name, description, translation."><figcaption><p>Add Category Form - to add the necessary details, such as name, description</p></figcaption></figure>

***

You can ***translate the category*** into other languages. To do that:

* Click on ***Add*** ***translation*** at the upper right-hand corner of category form.
* A pop-up module will appear on your screen, check/select the language(s) you want to translate to.
* Click on Add to finish.

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2Fc2lqDv4WNJUgxFogqFr7%2F3.5.4.png?alt=media&#x26;token=5d60d4c0-7348-4766-bfe3-131960b7c631" alt="Select a language you want to translate your content to."><figcaption><p>Select a language you want to translate your content to.</p></figcaption></figure>

***

You will be redirected to a page with the translatable content in the default language and fields where you can add your translations.

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2FXm5w1JK7lBRXBapSEw1V%2F3.5.5.png?alt=media&#x26;token=59f563e8-f9b4-495c-94a7-9962b325f13d" alt="Spanish was the language selected for translation"><figcaption><p>Spanish was the language selected for translation</p></figcaption></figure>

***

***Next:***

* On the empty fields, translate the category name and description details into the chosen language e.g in the above image the default language is English and the added language is Spanish.
* Click Save when all is done to create the category. You can now choose to add this category to any of your Surveys.
* In the dropdown (inside the form), you will see the available languages the category has been translated into.

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2F11WpwptPRxYrorsnXOTI%2F3.5.6.png?alt=media&#x26;token=fac7b4e3-7f2a-4e0b-bb1f-c9f10feea664" alt="All the available languages that the content has been translated to are shown."><figcaption><p>All the available languages that the content has been translated to are shown.</p></figcaption></figure>

***

\
\&#xNAN;***Second way to create categories:*** Add categories as custom fields as you build and edit Surveys. First, navigate to **Settings → Surveys,** and either select the already existing Survey you’d like to edit, or create a new Survey.

Click on ***Add field*** button in the survey builder/form and select **Categories** from the list of field options.

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2FkyRleeY5pVK3gqSJx3zB%2F3.5.8.png?alt=media&#x26;token=55ff6d97-50c7-470c-a188-9cd7ed6c6472" alt="Add categories to a survey."><figcaption><p>Add categories to a survey.</p></figcaption></figure>

***

***Configure the following***

* ***Name:*** Name or prompt for your category survey field
* ***Field description:*** Optional description for the category
* ***Which labels should be available:*** Select which categories you’d like to add to the field as options

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2FvI6ROw9t5P2yJrSBrXBG%2F3.5.9.png?alt=media&#x26;token=2f69d6b3-11a4-40ba-9fce-28b6161c4aec" alt="Adding a category as a field to a survey. &#x22;Add field&#x22; modal."><figcaption><p>Adding a category as a field to a survey. "Add field" modal.</p></figcaption></figure>

Click ***save*** to save your new categories field. It will now appear as a custom field with the appropriate categories on your Survey form.

***

## 3.5.2 Editing Categories <a href="#id-3-5-2-editing-categories" id="id-3-5-2-editing-categories"></a>

To edit a category, click on the desired category from the category list page.

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2Ftn9Z2YRoTFKmERInkAqG%2F5.3.6.png?alt=media&#x26;token=56fd34fb-7e76-4b0c-9d14-32411dac225a" alt="Select a category&#x27;s checkbox from the categories list in the Settings -> Categories page to edit it."><figcaption><p>Select a category's checkbox from the categories list in the Settings -> Categories page to edit it.</p></figcaption></figure>

***

You’ll get redirected to the ***Edit Category*** page, where you should be able to add/edit details as described in the [adding categories section](#3-5-1-adding-and-configuring-categories) above.

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2Fcw0Bs4Yhc2hCHGACirGn%2F3.5.10.png?alt=media&#x26;token=07b2cefb-3486-42a5-bea0-312073624a56" alt="Edit Categories Form - Save your changes with the save button"><figcaption><p>Edit Category Form - Save your changes with the save button</p></figcaption></figure>

When done, click on ***Save***, and your changes will reflect shortly.

***

## 3.5.3 Deleting Categories <a href="#id-3-5-3-deleting-categories" id="id-3-5-3-deleting-categories"></a>

You can delete one or multiple categories at a time.&#x20;

***To delete a single category:***

* Click on the category as if you want to edit the category
* Find the ***delete button*** at the bottom of the form

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2FkzH9mXXfeJib8NntRV8w%2F3.5.15.png?alt=media&#x26;token=349eb42f-0526-4e8e-86c7-e5f880c381c2" alt="Deleting a single category - delete category button highlighted"><figcaption><p>Deleting a single category - delete category button highlighted</p></figcaption></figure>

A pop up box will appear on the top of the page, prompting you to confirm whether you would like to delete the category/categories.

* Click on ***Yes, delete*** to delete your category/categories
* If you’d like to cancel the category deletion process, click on ***No, go back***

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2FX2WiEdshmUWc5wG0bNT6%2F3.5.16.png?alt=media&#x26;token=6bf689e2-bda1-4780-bf73-00a200e8ab67" alt="Warning message to delete single Category"><figcaption><p>Warning message to delete single Category</p></figcaption></figure>

***

**To delete multiple categories:**

* Click on bulk actions from the Categories list page in settings
* Then click on the ***Delete*** button or icon

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2FYvwB648r8QX2lyfqZnXq%2F3.5.11.png?alt=media&#x26;token=9654b809-8c1f-4516-b1c6-f94f3e7ec604" alt="Highlighted: trash (delete) button on the to of the categories list. "><figcaption><p>Highlighted: trash (delete) button on the to of the categories list. </p></figcaption></figure>

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2FfnHLk4bOmNrnhx6BVlbI%2F3.5.12.png?alt=media&#x26;token=d1dc3107-5da0-46c7-ad1f-824a272a2add" alt="Select the checkboxes in the category list corresponding to categories you wish to delete. Click the trash button on the top menu bar to delete."><figcaption><p>Select the checkboxes in the category list corresponding to categories you wish to delete. Click the trash button on the top menu bar to delete.</p></figcaption></figure>

A pop up box will appear on the top of the page, prompting you to confirm whether you would like to delete the category/categories.

* Click on ***Yes, delete*** to delete your category/categories
* If you’d like to cancel the category deletion process, click on ***No, go back***

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2Fj3dJe9reIYyFtbSrJfOf%2F3.5.13.png?alt=media&#x26;token=d1ed68e3-5ade-4c72-bf82-609489760237" alt="Delete category confirmation modal"><figcaption><p>Delete category confirmation modal</p></figcaption></figure>
