This is a migrated thread and some comments may be shown as answers.

Add _LoginPartial to Panel

1 Answer 383 Views
ResponsivePanel
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 2
Iron
Iron
Iron
Joel asked on 18 Dec 2018, 06:08 PM

I want to require a credential to be entered so I can track a users role, etc.  What is the recommend way to display the _LoginPartial in the Menu?  Or, do I accomplish this by making it part of the <div> ?

What DOESN'T look right:

<div class="container menu-content">
    <div class="navbar-collapse collapse">
        <partial name="_CookieConsentPartial"/>
        <div id="responsive-panel">
            @(Html.Kendo().Menu()
                  .Name("Menu")
                  .Items(items =>
                  {
                      items.Add()
                          .Text("About")
                          .Action("About", "Home");
                      items.Add()
                          .Text("Customers")
                          .Action("Index", "Customers");
                  }))
        </div>
        <partial name="_LoginPartial"/>
    </div>
    <button id="configure" class="k-rpanel-toggle k-button k-primary btn-toggle"><span class="k-icon k-i-hbars"></span></button>
</div>

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 21 Dec 2018, 01:42 PM
Hello Joel,

I am afraid that the Menu is not intended to render content in its item in the way that you need to do. Its main purpose is navigation, or have some content loaded upon selection. You can evaluate the usage of a toolbar, where you can use the Template to render the needed partial view output:

https://docs.telerik.com/kendo-ui/api/javascript/ui/toolbar/configuration/items.template

In the Template declaration in your scenario, you can also call an Action in Controller, which would return the partial view as content.

Regards,
Nencho
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ResponsivePanel
Asked by
Joel
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Nencho
Telerik team
Share this question
or