# Custom Menus

## Administration Module

### Overview <a href="#overview-admin" id="overview-admin"></a>

To create custom menus in the Administration Module, you must create and modify an XML file called `admin.xml` in the `CustomMenu` folder located in the `\wwwroot\wfgen\App_Data\customMenus` folder.

These custom menus will then be available as extra menu options in the Administration Module. WorkflowGen supports two levels of custom menu items.

Menu items can be secured by user profile.

### XML content <a href="#xml-content-admin" id="xml-content-admin"></a>

#### Menu item/node properties

| **Parameter**    | Description                                                                                                                                                                                                                                                                                                                                                                                        |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Title`          | <p>Specifies the title of the node<br><br>The title of the <code>menuItem</code> node will be the name used for the menu item on the Administration Module home page.</p>                                                                                                                                                                                                                          |
| `Profile`        | <p>Specifies if the link will be visible to users with an Administrator or User profile</p><p></p><p><strong>Possible values:</strong> <code>user</code> or <code>admin</code></p><p></p><p>✏️ <strong>Note:</strong> If <code>user</code> is specified, it does not grant access to all users but only to those that have access to the Administration Module (for example, folder managers).</p> |
| `URL`            | <p>Specifies the URL to add as a custom link</p><p>📌 <strong>Example:</strong> <code><http://www.workflowgen.com/></code></p>                                                                                                                                                                                                                                                                     |
| `Description`    | <p>Specifies a description for the custom link.</p><p>📌 <strong>Example:</strong> <code>Visit the WorkflowGen website!</code></p>                                                                                                                                                                                                                                                                 |
| `Target`         | <p>Specifies if the custom link will be opened within the WorkflowGen page (default) or in a new browser</p><p></p><p><strong>Possible values:</strong> <code>""</code> (default) or <code>\_new</code></p>                                                                                                                                                                                        |
| `showInHomepage` | <p>Specifies if the custom link will be displayed in the new menu item only or also on the Administration Module home page (default)</p><p></p><p><strong>Possible values:</strong> <code>true</code> (default) or <code>false</code></p>                                                                                                                                                          |
| `Icon`           | Specifies the path to a custom icon to be displayed instead of the default circular arrow icon                                                                                                                                                                                                                                                                                                     |

#### Images

You can also use images in a custom theme. To do this, create a new Theme package for WorkflowGen and direct the icon path to its location in the `\wfgen\App_Themes\MYTHEME\admin\images` folder.

The default path is `\wfgen\App_Themes\Default\admin\images`. You can also add your custom images to this folder and use them from the `Default` theme folder (see the example below).

### Sample `admin.xml` file <a href="#sample-admin-xml-file" id="sample-admin-xml-file"></a>

```html
<?xml version="1.0" encoding="utf-8" ?>
<menu>
    <menuItem title="My links..." profile="user">
        <menuItem title="Advantys" url="http://www.advantys.com/" target="_new" description="Advantys Web Site" profile="user" showInHomepage="true"  />
        <menuItem title="WorkflowGen" url="http://www.workflowgen.com/" target="" description="WorkflowGen Web Site" profile="admin" icon="myicon.gif" showInHomepage="false"  />
    </menuItem>
</menu>
```

## User Portal

### Overview <a href="#overview-portal" id="overview-portal"></a>

To create custom menus in the User Portal, you must create and modify an XML file called `portal.xml` in the `CustomMenu` folder located in the `\wwwroot\wfgen\App_Data\customMenus` folder.

These custom menus will then be available as extra **Menu** options on the User Portal home page.

Menu items can be secured by user profile.

### XML content <a href="#xml-content-portal" id="xml-content-portal"></a>

#### Menu item/node properties

| **Parameter** | Description                                                                                                                                                                                                                                                                                |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Title`       | <p>Specifies the title of the node<br><br>The title of the <code>menuItem</code> node will be the name used for the menu item on the User Portal home page.</p>                                                                                                                            |
| `Profile`     | <p>Specifies if the link will be visible to users with a User, Supervisor, Manager, or Administrator profile</p><p></p><p><strong>Possible values:</strong></p><ul><li><code>user</code></li><li><code>supervisor</code></li><li><code>manager</code></li><li><code>admin</code></li></ul> |
| `URL`         | <p>Specifies the URL to add as a custom link</p><p>📌 <strong>Example:</strong> <code><http://www.workflowgen.com/></code></p>                                                                                                                                                             |
| `Description` | <p>Specifies a description for the custom link.</p><p>📌 <strong>Example:</strong> <code>Visit the WorkflowGen website!</code></p>                                                                                                                                                         |
| `Target`      | <p>Specifies if the custom link will be opened within the WorkflowGen page (default) or in a new browser</p><p></p><p><strong>Possible values:</strong> <code>""</code> (default) or <code>\_new</code></p>                                                                                |
| `Icon`        | Specifies the path to a custom icon to be displayed instead of the default "Earth" icon                                                                                                                                                                                                    |

#### Images

You can also use images in a custom theme. To do this, create a new Theme package for WorkflowGen and direct the icon path to its location in the `\wfgen\App_Themes\MYTHEME\portal\images` folder .

The default path is `\wfgen\App_Themes\Default\portal\images`. You can also add your custom images to this folder and use them from the `Default` theme folder (see the example below).

### Sample `portal.xml` file <a href="#sample-portal-xml-file" id="sample-portal-xml-file"></a>

```html
<?xml version="1.0" encoding="utf-8" ?>
<menu>
    <menuItem title="WorkflowGen Resource Center" profile="user" url="http://www.workflowgen.com/resources" description="Open the WorkflowGen Resource Center web site" target="_new" icon="" />  
    <menuItem title="WorkflowGen" profile="supervisor" url="http://www.workflowgen.com/" description="Open the WorkflowGen website" target="_blank" icon="" />  
    <menuItem title="Advantys" profile="manager" url="http://www.advantys.com/" description="Open the Advantys web site" target="_self" icon="" />  
    <menuItem title="Google Search" profile="admin" url="http://www.google.com/" description="Open Google Search" target="_parent" icon="search_l.gif" />  
    <menuItem title="Yahoo!" profile="user" url="http://www.yahoo.com/" description="Open the Yahoo! website" target="_top" icon="" />  
    <menuItem title="New Leave Application" profile="user" url="/wfgen/show.aspx?QUERY=START&amp;P=LEAVE_APPLICATION" description="Launch a new leave application" target="_new" icon="http://dev4/wfgen/App_Themes/Default/portal/images/request_followup_form_l.gif" />
</menu>
```
