---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, Presentation Components, widgets, tags, UI components]
nav: wcp_docs
parent_url: /wcp_docs/
title: hub
layout: subsection
wd_wcptag: hub
---

<a id="section_N10021_N1001E_N10001"></a>
A container widget that displays a navigation pane on the left and task pages on the right. The `hub` widget enables you to create a centralized area with navigation links to contextual tasks and related information.

Use `hub` only on view pages. The navigation tasks must also be view pages. The `hub` widget currently doesn't support edit pages.

<a id="section_isq_p41_4rb"></a>
Jump to:

-   [Attributes](/wcp_docs/qum1635896773979.html#section-attributes)


## <a id="section_rmx_gr5_nrb"></a>Usage

The `hub` tag is the only tag in the presentation `body` of a view page. To construct a hub, specify these main attributes:

-   `label` - The hub title, which displays at the top of the left navigation pane.
-   `icon` - The icon next to the hub title.
-   `initialTask` - The default landing page. This page displays on the right pane when the hub loads.

    <b>Note:</b> The `initialTask` doesn't display a link on the left navigation pane. If you want to include a link to the `initialTask` on the left navigation pane, add an `item` in `navigationTasks[]` that specifies the same task.

-   `navigationTasks[]` - The list of links on the left navigation pane. Specify a combination of:

    -   `item` tags.
    -   `group` tags containing `items[]`.

    Each item, whether an individual item or in a group, is a link that displays a task page on the right pane. You can optionally specify an icon for each item, but not for items in a group.

-   `additionalLinks` - An optional section at the bottom of the left navigation pane that contains links to either external sites or other tasks that open outside the hub.


Consider these guidelines:

-   Ensure that you've defined all task pages in the AMD.
-   Ensure that the `queryParams` variables you use in the task pages match the parameters you send from the `hub`.
-   You can use a task page only within 1 hub. You can't use the same `taskId` across multiple `hub` or `listDetailHub` widgets in multiple PMDs.
-   `navigationTasks[]` can have a maximum number of 20 items.
-   `items[]` in a group can have a maximum of 5 items.
-   `additionalLinks` can have a maximum of 20 links.
-   Workday doesn't support embedding the `hub` widget within a profile group and dashboard.


## <a id="section_r2w_snf_4rb"></a>Example

This sample `hub` displays related pages about the current worker. The <b>Job Title</b> and <b>Contact Information</b> labels on the navigation pane are `item` tags.

![](GUID-713b6c57-bde5-49cf-a4aa-8192077b2782-enHYPHENus.png)

The <b>Worker Details</b> label on the navigation pane is a `group` tag. When expanded, it displays the <b>Skills</b> item.

![](GUID-8a64fedf-e700-47dd-aa80-47da0842f18d-enHYPHENus.png)

The sample PMD with the `hub` tag:

```
{
 "id": "hubStatic",
 "presentation": {
   "body": {
     "type": "hub",
     "label": "<% currentWorker.descriptor + ' Hub' %>",
     "icon": "wd-accent-award-medal",
     "initialTask": {
       "taskId": "hubTaskOne",
       "parameters": {
         "pageTitle": "Job Title",
         "label1": "Business Title",
         "field1": "<% currentWorker.primaryJob.businessTitle %>",
         "label2": "Organization",
         "field2": "<% currentWorker.primaryJob.supervisoryOrganization.descriptor %>"
       }
     },
     "navigationTasks": [
       {
         "type": "item",
         "task": {
           "taskId": "hubTaskOne",
           "parameters": {
             "pageTitle": "Job Title",
             "label1": "Business Title",
             "field1": "<% currentWorker.primaryJob.businessTitle %>",
             "label2": "Organization",
             "field2": "<% currentWorker.primaryJob.supervisoryOrganization.descriptor %>"
           }
         },
         "label": "Job Title"
       },
       {
         "type": "item",
         "task": {
           "taskId": "hubTaskOne",
           "parameters": {
             "pageTitle": "Contact Information",
             "label1": "Email",
             "field1": "<% currentWorker.person.email %>",
             "label2": "Phone",
             "field2": "<% currentWorker.person.phone %>"
           }
         },
         "icon": "wd-icon-mail",
         "label": "Contact Information"
       },
       {
         "type": "group",
         "label": "Worker Details",
         "icon": "wd-icon-folder-close",
         "items": [
           {
             "type": "item",
             "task": {
               "taskId": "hubTaskTwo",
               "parameters": {
                 "pageTitle": "Skills",
                 "workerId": "<% currentWorker.id %>"
               }
             },
             "label": "Skills"
           }
         ]
       }
     ],
     "additionalLinks": {
       "title": "Suggested Links",
       "links": [
         {
           "type": "external",
           "label": "<% 'Workday' %>",
           "url": "<% 'https://www.workday.com' %>"
         },
         {
           "type": "task",
           "label": "Team Members",
           "task": {
             "taskId": "teamMembers"
           }
         }
       ]
     }
   }
 },
 "endPoints": [
   {
     "baseUrlType": "workday-staffing",
     "name": "currentWorker",
     "authType": "sso",
     "url": "/workers/me"
   }
 ]
}
```

Notes about the sample hub:

-   The `initialTask` uses the <i>hubTaskOne</i> task page, which displays the <b>Job Title</b> landing page.

    The sample <i>hubTaskOne.pmd</i>:

    ```
    {
     "id": "hubTaskOne",
     "presentation": {
       "title": {
         "type": "title",
         "label": "<% queryParams.pageTitle %>"
       },
       "body": {
         "type": "section",
         "horizontal": false,
         "children": [
           {
             "type": "text",
             "id": "text1",
             "label": "<% queryParams.label1 %>",
             "value": "<% queryParams.field1 %>"
           },
           {
             "type": "text",
             "id": "text2",
             "label": "<% queryParams.label2 %>",
             "value": "<% queryParams.field2 %>"
           }
         ]
       }
     }
    }
    ```

-   The `navigationTasks[]` includes a link that also displays the <b>Job Title</b> page. This sample enables the user to navigate back to the landing page of the hub.
-   The <b>Job Title</b> and <b>Contact Information</b> links send different parameters to the same task page, <i>hubTaskOne</i>.
-   The <b>Skills</b> link displays the <i>hubTaskTwo</i> task page. The sample task page uses the passed <i>queryParams.workerId</i> to retrieve the skills and display them in a grid.


## <a id="section-mobile-support"></a>Mobile Support

Android, iOS

## <a id="section-attributes"></a>Attributes

-   <b>initialTask</b>

    Data type: object

    (Required) The landing page of the hub.

    Contains these attributes:

    -   <b>taskId</b>

        Data type: string

        (Required) The `taskId` that corresponds to a page to display on the right pane. Ensure that you've defined the `taskId` in the AMD.

    -   <b>parameters</b>

        Data type: Map<String, StringScript>

        A map containing task parameters sent to the specified `taskId` page. Note that the parameter value supports PMD Scripting. The page can reference these parameters using the `queryParams` variable.


-   <b>navigationTasks</b>

    Data type: list of item and group objects

    (Required) The list of navigation tasks that display as links on the left navigation pane.

    `navigationTasks[]` can contain a combination of `item` and `group` objects. The maximum number of items in `navigationTasks[]` is 20.

    -   <a id="d209e15328"></a><b>item</b>

        Data type: object

        Represents a navigation link, each with an icon and label. An `item` contains these attributes:

        -   <b>label</b>

            Data type: stringScript

            (Required) The link text.

        -   <b>task</b>

            Data type: object

            (Required) The task for the navigation link.

            Contains these attributes:

            -   <b>taskId</b>

                Data type: string

                (Required) The `taskId` that corresponds to a page to display on the right pane. Ensure that you've defined the `taskId` in the AMD.

            -   <b>parameters</b>

                Data type: Map<String, StringScript>

                A map containing task parameters sent to the specified `taskId` page. Note that the parameter value supports PMD Scripting. The page can reference these parameters using the `queryParams` variable.


        -   <b>icon</b>

            Data type: string

            The name of the icon that displays on the left of the link. If you don't specify an icon, the item uses a default icon. For valid values, see the icons prefixed with `wd-icon` in <i>Navigation Link Icons</i> in [Reference: Icons](/wcp_docs/pyw1636491346913.html).

        -   <b>render</b>

            Data type: booleanScript

            If true, this item renders as a link on the hub navigation. If false, the hub navigation doesn't add this link. The default is true.


    -   <a id="d209e15403"></a><b>group</b>

        Represents a group of up to 5 links, which can have a group-level icon and label. The `group` tag contains these attributes:

        -   <b>items</b>

            Data type: list of item objects

            (Required) `items[]` contains up to 5 `item` objects. The items in a group don't use icons.

            An `item` contains these attributes:

            -   <b>label</b>

                Data type: stringScript

                (Required) The link text.

            -   <b>task</b>

                Data type: object

                (Required) The task for the navigation link.

                Contains these attributes:

                -   <b>taskId</b>

                    Data type: string

                    (Required) The `taskId` that corresponds to a page to display on the right pane. Ensure that you've defined the `taskId` in the AMD.

                -   <b>parameters</b>

                    Data type: Map<String, StringScript>

                    A map containing task parameters sent to the specified `taskId` page. Note that the parameter value supports PMD Scripting. The page can reference these parameters using the `queryParams` variable.


            -   <b>render</b>

                Data type: booleanScript

                If true, this item renders as a link on the hub navigation. If false, the hub navigation doesn't add this link. The default is true.


        -   <b>label</b>

            Data type: stringScript

            (Required) The group label. The group label has a drop-down arrow that expands or collapses the group of links.

        -   <b>icon</b>

            Data type: string

            The name of the icon that displays on the left of the link. If you don't specify an icon, the group uses a default icon. For valid values, see the icons prefixed with `wd-icon` in <i>Navigation Link Icons</i> in [Reference: Icons](/wcp_docs/pyw1636491346913.html).

        -   <b>render</b>

            Data type: booleanScript

            If true, this item renders as a link on the hub navigation. If false, the hub navigation doesn't add this link. The default is true.



-   <b>additionalLinks</b>

    Data type: AdditionalHubLink map

    Contains additional navigation links at the bottom of the navigation pane. A line displays at the top of the additional links section. The maximum number of links in `additionalLinks` is 20.

    An AdditionalHubLink map contains these attributes:

    -   <b>title</b>

        Data type: stringScript

        The title of the additional links section.

    -   <b>links</b>

        Data type: AdditionalHubNavigationLink array

        The list of additional links. A link can either be an `external` or `task` tag:

        -   `external` - The link opens an external URL outside the hub. Specify the required `label` and `url` attributes. Example:

            ```
            {
            "type": "external",
            "label": "<% 'Go to Workday' %>",
            "url": "<% 'https://www.workday.com' %>"
            }
            ```

        -   `task` - The link opens a task page outside the hub. Specify the required `label` and `task` attributes. Example:

            ```
            {
            "type": "task",
            "label": "<% 'Go to External Task' %>",
            "task": {
              "taskId": "anotherTask",
              "parameters": {
                   "workerId": "<% currentWorker.id %>"
              }
            }
            }
            ```



-   <b>icon</b>

    Data type: string

    The name of the icon that displays at the top of the left navigation pane. For valid values, see the icons prefixed with `wd-accent` in <i>Hub Title Icons</i> in [Reference: Icons](/wcp_docs/pyw1636491346913.html).

    The default icon is a task clipboard icon.

-   <b>label</b>

    Data type: stringScript

    The text that displays at the top of the left navigation pane.



