# How to Create a Top Menu Bar with Sub-Menus in Webster+

> Source: https://manual.pvxplus.com/how-to/how-to-create-a-top-menu-bar

This tutorial shows you how to create a top menu bar with sub-menus in Webster+.

The following example shows a top menu bar with two sub-menus, **Ledger** and **GL Accounts**.

![](https://manual.pvxplus.com/migration-assets/bea3237267055e2eb2de844ce1d4a9f5c13c9ae2b245798ab262bf47cffd09df.png)

For this tutorial, the **Ledger** sub-menu will be defined. It has three options - **Post to Ledger**, **View Ledger Postings**, and **View Transactions by Date**. This menu will be added to the **Products** page.

![](https://manual.pvxplus.com/migration-assets/0e3c86e5af3cd167a52b80fe97c5cf894c2ba6ca368158879137af3d7914864a.png)

Note:  
Before defining the menu, ensure that the reports and Web pages associated with the menu options have been defined.

## Defining the Menu Bar Items

These steps show you how to define the menu bar items using **[Menu Maintenance](https://manual.pvxplus.com/webster/menu-maintenance)**.

|  |  |
| --- | --- |
| 1\. | On the left side, click **Setup**. Then, in the top menu, click **Menus** to access the **Menu Maintenance** page.<br>![](https://manual.pvxplus.com/migration-assets/e18e33c9a223551c254fa77a974d5bc115d755dd2b243326a82e40e0b4d2eb92.png) |
| 2\. | In the *Menu* field, enter **Ledger** as the menu name.<br>![](https://manual.pvxplus.com/migration-assets/2fd70ac8e6f4b2c903cd9c0f5618cabea180ad901e460e5d472192c4093907df.png) |
| 3\. | Define the menu options by entering the details in the grid. For a description of each column, see **[Menu Maintenance](https://manual.pvxplus.com/webster/menu-maintenance)**.<br>In the first row, enter the following details:<br>\| **Column Name** \| **Entry** \|<br>\| --- \| --- \|<br>\| *Text* \| Ledger \|<br>\| *Symbol* \| Anchor \|<br>\| *Security Group* \| Any \|<br>\| *Window* \| New \|<br>\| *Action* \| Submenu \|<br>\| *Associated Name* \| gl_actions \|<br>The *Action* entry (Submenu) identifies **Ledger** as a sub-menu item, and the *Associated Name* entry (gl_actions) specifies the name of the related sub-menu.<br>For this example, the *gl_actions* sub-menu will be defined later. See **[Defining the Sub-Menu Options](https://manual.pvxplus.com/how-to/how-to-create-a-top-menu-bar#submenu_opts)**. |
| 4\. | After completing the entries, the window looks like this:<br>![](https://manual.pvxplus.com/migration-assets/1e72a190b742e069bd2cb4073c91b4b0e2c74309da910d75b514aa93e8cdeb28.png) |
| 5\. | Click **Save** at the bottom.<br>![](https://manual.pvxplus.com/migration-assets/b2fe95e05a909ece10d35942d3638534cca84869596932b1098379006bf53a7b.png) |
| 6\. | A message appears near the top confirming that the "Ledger" menu has been saved.<br>![](https://manual.pvxplus.com/migration-assets/f4d4d51f82bd27403db2ee36d0020fcb799222f186512a2b260553324c323290.png) |

***Defining the Sub-Menu Options***

Define the options for the *gl_actions* sub-menu (see [Step 3](https://manual.pvxplus.com/how-to/how-to-create-a-top-menu-bar#step3)).

|  |  |
| --- | --- |
| 7\. | In **[Menu Maintenance](https://manual.pvxplus.com/webster/menu-maintenance)**, enter *gl_actions* in the **Menu** field.<br>![](https://manual.pvxplus.com/migration-assets/0e50893bbb2058178fad658eaeea87c4fc14addb5baaf8eed543be81021431fe.png) |
| 8\. | The *gl_actions* sub-menu has three options. Enter the following details (one option per row):<br>\| **Column Name** \| **Entry** \|<br>\| --- \| --- \|<br>\| *Text* \| Post to Ledger \|<br>\| *Symbol* \| Book \|<br>\| *Security Group* \| Any \|<br>\| *Window* \| Same \|<br>\| *Action* \| Webpage \|<br>\| *Associated Name* \| glviewpost \|<br>\| **Column Name** \| **Entry** \|<br>\| --- \| --- \|<br>\| *Text* \| View Ledger Postings \|<br>\| *Symbol* \| Bitcoin \|<br>\| *Security Group* \| Any \|<br>\| *Window* \| Same \|<br>\| *Action* \| Report \|<br>\| *Associated Name* \| glpostings \|<br>\| **Column Name** \| **Entry** \|<br>\| --- \| --- \|<br>\| *Text* \| View Transactions by Date \|<br>\| *Symbol* \| Calendar \|<br>\| *Security Group* \| Any \|<br>\| *Window* \| Same \|<br>\| *Action* \| Report \|<br>\| *Associated Name* \| glaccounts \| |
| 9\. | After completing the entries, the window looks like this:<br>![](https://manual.pvxplus.com/migration-assets/750ff6be7f0d267cd9bb71e50170b6e36c0542e93276250dba8ad40bbd1f2d31.png) |
| 10\. | An ***optional*** separator line can be added between sub-menu options by entering three or more dashes in a blank row and then dragging the row to the desired location.<br>For this example, a separator line will be added below the **Post to Ledger** option. In the blank row, enter the following details for the **Text** and **Window** columns:<br>\| **Column Name** \| **Entry** \|<br>\| --- \| --- \|<br>\| *Text* \| --- \|<br>\| *Symbol* \|  \|<br>\| *Security Group* \|  \|<br>\| *Window* \| Same \|<br>\| *Action* \|  \|<br>\| *Associated Name* \|  \| |
| 11\. | After completing these entries, the window looks like this:<br>![](https://manual.pvxplus.com/migration-assets/e3720fd61c9d9c6202ded478f30b35b446fcc4af856d9487deebd1b28445f728.png) |
| 12\. | In the first column of this row, click the **Drag** (triple bar) icon, and while holding down the mouse, drag the selected row up so it sits directly below the Post to Ledger row. Release the mouse.<br>![](https://manual.pvxplus.com/migration-assets/7654416c576e3acc503df1f8a9d807c891ce45af4609f4c27173c18e89e42e95.png) |
| 13\. | After moving the row, the window looks like this:<br>![](https://manual.pvxplus.com/migration-assets/b2a6abb15a75b59aa80ca0ab839bd5ea4c35622f2b2a7445c5eab1d20cc0fbe4.png) |
| 14\. | Click **Save**. |
| 15\. | A message appears near the top confirming that the "gl_actions" menu has been saved.<br>![](https://manual.pvxplus.com/migration-assets/005abf2ade512f700d6bba455e7024f9226febc583d19447c92b68e7e980b1b5.png) |

***Adding the Short Code to the HTML Page***

Add the **[\[menubar menu=xxx\]](https://manual.pvxplus.com/webster/short-codes#menubar)** short code to the HTML page:

|  |  |
| --- | --- |
| 16\. | Add the following line of code to the **Product** HTML page anywhere below the **\<body>** tag (before the page title in this example):<br>\[menubar menu=**ledger** class=font_125\]<br>![](https://manual.pvxplus.com/migration-assets/ad1e4c6764b51886433853053a8e176d9da22ac2d1375d89d1d5209905b8342e.png) |
| 17\. | Preview the results. On the left side, click **Products** and then select **Ledger**. |
| 18\. | The **Ledger** menu shows the three options:<br>![](https://manual.pvxplus.com/migration-assets/f6e64f81342831987fc5bb52296061db93328711183b56bd3b0f59e2c7019628.png) |
