Inhalte aufrufen

Profilbild

How To Display Popup from a Plugin

Display Popup from a Plugin

1 Antwort zu diesem Thema

#1 nitware

nitware

    Member

  • Members
  • 24 Beiträge

Geschrieben: 26 November 2017 - 14:24

Hello team,

 

I want to display popup from a plugin. I referenced the popup layout page with the code below from my plugin view.

 @{
     Layout = "~/Administration/Views/Shared/Layouts/_AdminPopupLayout.cshtml";
  }

The above code throws the below exception:

The layout page "_AdminRoot" could not be found at the following path: "~/Administration/Views/Shared/Layouts/_AdminRoot".

How do I resolve this?

 

Thanks in advance for your assistance.


  • SalehBagheri gefällt das

#2 SalehBagheri

SalehBagheri

    Member

  • Members
  • 23 Beiträge

Geschrieben: 31 May 2018 - 01:05

You can use [AdminThemed] action filter in your plugin controller!

[AdminThemed]
Public ActionResult YourModalOrPage()
{
     return View();
}

and in your view file:

@{
     Layout = "_AdminLayout.cshtml";
}

<h1>Hello in Admin</h1>




Auf dieses Thema antworten