# Changing the Menu Path

## Create and modify a menu path in the same run  <a href="#create-and-modify-a-menu_path-in-the-same-run" id="create-and-modify-a-menu_path-in-the-same-run"></a>

The `menu_path` can be modified mid execution. If the `menu_path` does not previously exist, it is created inside the current board when the code is executed. If no board name has been set, the SDK will use the name : 'Default Name'. If the board does not exist it will create it. This will only happen in the case the path didn't exist beforehand, if an existing path is referenced it will link the menu path to the specified board, even if the other boards already have a link to the menu path.

All charts created after setting the menu path will be included in the specified menu path, until it is changed to another.

```python
s.set_board('Custom Board')

s.set_menu_path('menu path', 'sub-path')

data = [
    {'date': dt.date(2021, 1, 1), 'x': 5, 'y': 10},
    {'date': dt.date(2021, 1, 2), 'x': 6, 'y': 8},
    {'date': dt.date(2021, 1, 3), 'x': 4, 'y': 10},
    {'date': dt.date(2021, 1, 4), 'x': 7, 'y': 2},
    {'date': dt.date(2021, 1, 5), 'x': 3, 'y': 14},
    {'date': dt.date(2021, 1, 6), 'x': 6, 'y': 10},
    {'date': dt.date(2021, 1, 7), 'x': 3, 'y': 12},
    {'date': dt.date(2021, 1, 8), 'x': 8, 'y': 14},
]

s.plt.bar(data=data, x='date', order=0)
```

![A new menu path and board have been created by using the code on an empty workspace.](/files/SD3pKKc3tfbQE4Xk8V5U)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shimoku.com/dev/building-web-app/menu/changing-the-menu-path.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
