---
title: "Lesson 1 - Templates"
canonical: "https://support.appfire.com/space/CDML/649759434/Lesson%201%20-%20Templates"
format: markdown
---
> Macro (aura-html)


## Create a page

Go to your personal space (or some other space where you can create content)

- **Create** a blank page

It doesn't matter what you call the page, or what's in it. It's just somewhere for us to build our workflow.

## Space versus page mode

Before we continue, you need to know about the two modes the Comala Document Management app provides at the space level.

One of them is called **page mode**

- Page mode allows every page in the space to have its own unique workflow
- It's great for developing workflows, but it makes managing workflows harder because every page has a separate unique copy of the workflow

The other mode is called **space mode**

- Space mode lets you apply centrally managed workflows to the entire space – all pages and blog posts. You can filter the space workflow application by content label or content type (page or blog post) if required

If you want to see a side-by-side comparison, see: [https://appfire.atlassian.net/wiki/spaces/CDML/pages/649889023](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649889023) 

For now, we'll use page mode, as it's a bit easier to get started that way.

## Add workflow

In **Page Mode**, the process of creating a workflow is to simply add one to a page. Here's how...

From the **[Page Tools Menu](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649856105)**, choose **Add Workflow...**

![image](media://4e0b1cf9-387d-4ce8-b791-281a4af0863e)

> 📝 *If you don't see that option, make sure that the space is running in **[page mode](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649628831)** and that there are no active **[space workflows](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650154022)**.*

You'll now see the **Add Workflow** dialog, like this.

![image](media://6d6f5b5f-8d47-4dcb-9c26-226e168f9bf5)

> ℹ️ This is the **workflow picker** dialog box.

You'll see a scrollable list of existing workflows that you can apply.

If you were to choose one of those (*don't, as we're going to do something else*), it would make a completely new copy of that workflow on your page. If the original workflow was changed, it wouldn't affect the copy of it on your page.

## Custom states workflow

There's a special workflow in that list called **Workflow with custom states**.

- If required, scroll right to the bottom of the list and choose this workflow

> ✅ This is where most workflows are born.

When you choose the **Workflow with custom states**, a box appears with some default states.

Let's use these default states for the moment; we can change them later.

- Choose the **Apply & Customize** button

This opens the workflow builder visual editor.

![image](media://6b9ae944-ef36-4758-96cc-26755d5d532b)

The custom states workflow is displayed as a

- Flow diagram in the right-hand panel
- Visual listing on the left-hand panel

> ℹ️ How does this workflow appear and work on our content?

- Choose **Exit** to view the content with the workflow applied

## Workflow added to the content

The content will have two breadcrumbs added to the page

**Workflow icon**

![image](media://ff1e0d19-16ab-463c-8287-39480d96e854)

The workflow icon is a link to a simple workflow inspector.

![image](media://0b01d78c-8eee-4830-aae0-a68ac93af61d)

**Workflow state breadcrumb**

![image](media://6369df69-ce8a-4c46-aee0-9cc819850a7b)

The state breadcrumb and status indicator circle is a link to open the workflow state dialog box.

![image](media://b7115114-9a00-4f71-b2e6-86fa5fe7e135)

## Test it

Familiarise yourself with the following:

- [https://appfire.atlassian.net/wiki/spaces/CDML/pages/650117676](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650117676)
- [https://appfire.atlassian.net/wiki/spaces/CDML/pages/649659846](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649659846)
- [https://appfire.atlassian.net/wiki/spaces/CDML/pages/650216987](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650216987)
- [https://appfire.atlassian.net/wiki/spaces/CDML/pages/649825888](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649825888)
- [https://appfire.atlassian.net/wiki/spaces/CDML/pages/649824290](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649824290)

After you've done that, we'll continue with the second lesson.

| [Lesson 2 - States](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649792850) › |
| --- |