> For the complete documentation index, see [llms.txt](https://docs.shiftiq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shiftiq.com/contributors/implementation/front-end/insite.ui/ui-navigation.md).

# Navigation

## Dynamic Breadcrumbs

### The problem

Our current screen implementation allows to bind it to the parent and builder the breadcrumb.\
Though sometimes the screen can be referenced by multiple other screens and we need to support the dynamic breadcrumbs.\
For example, the screen "Lock Survey's Response" can be referenced from "Response Search" page and "Response Outline" page.\
The proposed solution uses two new interfaces and the class **ReturnUrl**.

### The solution

1. The screen should implement two additional interfaces: **IOverridesParent** and **IHasParentLinkParameters**

```
    public partial class Lock : BaseScreenUserControl, IOverridesParent, IHasParentLinkParameters
    {
```

1. Implement methods **GetParent** and **GetParentLinkParameters**.\
   Below is an example from Lock.ascx screen

```
        WebRoute IOverridesParent.GetParent() =>
            GetParent();

        string IHasParentLinkParameters.GetParentLinkParameters(WebRoute parent) =>
            GetParentLinkParameters(parent, "panel=results");
```

Methods **GetParent** and **GetParentLinkParameters** are members of **BaseScreenUserControl** class.

1. If it is required to redirect back to the parent screen manually then **GetReturnUrl** method can be used

```
            CancelButton.NavigateUrl = GetReturnUrl("panel=results");
```

1. When it is needed to generate the link with "return url" then the class **ReturnUrl** can be used.\
   Below is an example from Responses/Outline.ascx

```
            LockLink.NavigateUrl = new ReturnUrl($"session={queryString.Session}")
                .GetRedirectUrl($"/admin/surveys2/responses/lock?session={queryString.Session}");
            UnlockLink.NavigateUrl = new ReturnUrl($"session={queryString.Session}")
                .GetRedirectUrl($"/admin/surveys2/responses/unlock?session={queryString.Session}");
```

### Notes

1. The approach is changed in Shift.UI project


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.shiftiq.com/contributors/implementation/front-end/insite.ui/ui-navigation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
